From 703af68b0aea10252a11e738b147054926b19f24 Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Sat, 28 Jul 2012 08:15:34 -0400 Subject: do not allow sodipodi:docname to have a temporary filename (partial fix for Bug 243162) Fixed bugs: - https://launchpad.net/bugs/243162 (bzr r11574) --- src/document.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/document.cpp') diff --git a/src/document.cpp b/src/document.cpp index 818558a94..01c5481b0 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -354,9 +354,9 @@ SPDocument *SPDocument::createDoc(Inkscape::XML::Document *rdoc, /* End of quick hack 2 */ /* Quick hack 3 - Set uri attributes */ - if (uri) { - rroot->setAttribute("sodipodi:docname", uri); - } +// if (uri) { // this is done in do_change_uri() +// rroot->setAttribute("sodipodi:docname", uri); +// } /* End of quick hack 3 */ /* Eliminate obsolete sodipodi:docbase, for privacy reasons */ @@ -714,7 +714,8 @@ void SPDocument::do_change_uri(gchar const *const filename, bool const rebase) Inkscape::XML::rebase_hrefs(this, new_base, true); } - repr->setAttribute("sodipodi:docname", new_name); + if (strncmp(new_name, "ink_ext_XXXXXX", 14)) // do not use temporary filenames + repr->setAttribute("sodipodi:docname", new_name); DocumentUndo::setUndoSensitive(this, saved); -- cgit v1.2.3