summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-io.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-11-06 10:18:22 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-11-07 20:58:07 +0000
commit5835eaa282065fe8f44fb071a467f10c0adcb76a (patch)
treee9f07e0514b6ccdfaf52619b0a93044cefe19907 /src/xml/repr-io.cpp
parentRefactor rebase_hrefs with new URI API (diff)
downloadinkscape-5835eaa282065fe8f44fb071a467f10c0adcb76a.tar.gz
inkscape-5835eaa282065fe8f44fb071a467f10c0adcb76a.zip
fix clipboard URL rebasing
Diffstat (limited to 'src/xml/repr-io.cpp')
-rw-r--r--src/xml/repr-io.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
index 35a2e3793..258f50fe5 100644
--- a/src/xml/repr-io.cpp
+++ b/src/xml/repr-io.cpp
@@ -43,7 +43,6 @@ using Inkscape::XML::Document;
using Inkscape::XML::SimpleDocument;
using Inkscape::XML::Node;
using Inkscape::XML::AttributeRecord;
-using Inkscape::XML::calc_abs_doc_base;
using Inkscape::XML::rebase_href_attrs;
Document *sp_repr_do_read (xmlDocPtr doc, const gchar *default_ns);
@@ -709,8 +708,15 @@ bool sp_repr_save_rebased_file(Document *doc, gchar const *const filename, gchar
Glib::ustring old_href_abs_base;
Glib::ustring new_href_abs_base;
+
+ if (old_base) {
+ old_href_abs_base = old_base;
+ if (!Glib::path_is_absolute(old_href_abs_base)) {
+ old_href_abs_base = Glib::build_filename(Glib::get_current_dir(), old_href_abs_base);
+ }
+ }
+
if (for_filename) {
- old_href_abs_base = calc_abs_doc_base(old_base);
if (Glib::path_is_absolute(for_filename)) {
new_href_abs_base = Glib::path_get_dirname(for_filename);
} else {