diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2009-08-07 12:32:06 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2009-08-07 12:32:06 +0000 |
| commit | 0ff8eef7cfad92189e1d624a2b3ae449be64e891 (patch) | |
| tree | b1234b6e3d17f0e57a4f476f557407380705182a /src/inkscape.cpp | |
| parent | Improving Diffuse light and Specular light and adding a Melted jelly and a Me... (diff) | |
| download | inkscape-0ff8eef7cfad92189e1d624a2b3ae449be64e891.tar.gz inkscape-0ff8eef7cfad92189e1d624a2b3ae449be64e891.zip | |
Report complete paths when doing an emergency save (closes LP #171392)
(bzr r8436)
Diffstat (limited to 'src/inkscape.cpp')
| -rw-r--r-- | src/inkscape.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 60ab895ed..01e11a916 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -634,6 +634,7 @@ inkscape_crash_handler (int /*signum*/) gchar * location = homedir_path(c); Inkscape::IO::dump_fopen_call(location, "E"); file = Inkscape::IO::fopen_utf8name(location, "w"); + g_snprintf (c, 1024, "%s", location); // we want the complete path to be stored in c (for reporting purposes) g_free(location); if (!file) { // try saving to /tmp @@ -643,9 +644,14 @@ inkscape_crash_handler (int /*signum*/) } if (!file) { // try saving to the current directory + gchar *curdir = g_get_current_dir(); g_snprintf (c, 1024, "inkscape-%.256s.%s.%d.svg", docname, sptstr, count); Inkscape::IO::dump_fopen_call(c, "F"); file = Inkscape::IO::fopen_utf8name(c, "w"); + // store the complete path in c so that it can be reported later + gchar * location = g_build_filename(curdir, c, NULL); + g_snprintf (c, 1024, "%s", location); + g_free(location); } if (file) { sp_repr_save_stream (repr->document(), file, SP_SVG_NS_URI); |
