Code

Added missing (and very important) file.
[inkscape.git] / src / extension / implementation / script.cpp
index 964eb85d87d9b46a73fe7c9108885c1b863de449..eabf147f64980afa2acbb18027dc682c961da6a3 100644 (file)
@@ -38,6 +38,7 @@
 #include "dialogs/dialog-events.h"
 #include "application/application.h"
 #include "xml/node.h"
+#include "xml/attribute-record.h"
 
 #include "util/glib-list-iterators.h"
 
@@ -580,7 +581,9 @@ Script::open(Inkscape::Extension::Input *module,
     } // data_read
 
     if (mydoc != NULL) {
-        sp_document_set_uri(mydoc, filenameArg);
+        g_free(mydoc->base);
+        mydoc->base = NULL;
+        sp_document_change_uri_and_hrefs(mydoc, filenameArg);
     }
 
     // make sure we don't leak file descriptors from g_file_open_tmp