summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9ab975c)
raw | patch | inline | side by side (parent: 9ab975c)
author | cilix42 <cilix42@users.sourceforge.net> | |
Fri, 7 Aug 2009 12:32:06 +0000 (12:32 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Fri, 7 Aug 2009 12:32:06 +0000 (12:32 +0000) |
src/inkscape.cpp | patch | blob | history |
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 60ab895ede7789bf05f082b957aaf1f017375f40..01e11a9161260e01fc129d015d90787c113959d0 100644 (file)
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
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
}
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);