summaryrefslogtreecommitdiffstats
path: root/src/object/uri-references.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-12-09 14:56:40 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-12-09 20:50:04 +0000
commit34d2e296a45845f9241cedeafff7b23e06d8f5cf (patch)
treedea6c03ac9504dfbeebbd3671c5dd632671efcca /src/object/uri-references.cpp
parentFix license in new files (diff)
downloadinkscape-34d2e296a45845f9241cedeafff7b23e06d8f5cf.tar.gz
inkscape-34d2e296a45845f9241cedeafff7b23e06d8f5cf.zip
remove Inkscape::URI::getFullPath
Diffstat (limited to 'src/object/uri-references.cpp')
-rw-r--r--src/object/uri-references.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/object/uri-references.cpp b/src/object/uri-references.cpp
index 21b90c950..3e11cd26c 100644
--- a/src/object/uri-references.cpp
+++ b/src/object/uri-references.cpp
@@ -130,8 +130,16 @@ void URIReference::attach(const URI &uri)
// The path contains references to separate document files to load.
if (document && uri.getPath() && !skip) {
- std::string base = document->getBase() ? document->getBase() : "";
- std::string path = uri.getFullPath(base);
+ char const *base = document->getBase();
+ auto absuri = URI::from_href_and_basedir(uri.str().c_str(), base);
+ std::string path;
+
+ try {
+ path = absuri.toNativeFilename();
+ } catch (const Glib::Error &e) {
+ g_warning("%s", e.what().c_str());
+ }
+
if (!path.empty()) {
document = document->createChildDoc(path);
} else {