summaryrefslogtreecommitdiffstats
path: root/src/uri-references.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2014-01-25 01:05:26 +0000
committerMartin Owens <doctormo@gmail.com>2014-01-25 01:05:26 +0000
commitddb8af8009f151c7107daf0c2127f0ba2d882649 (patch)
tree7ce918b452da5860dee2f5fd5926e28a1907c71b /src/uri-references.cpp
parentfixed user description of VS command (diff)
downloadinkscape-ddb8af8009f151c7107daf0c2127f0ba2d882649.tar.gz
inkscape-ddb8af8009f151c7107daf0c2127f0ba2d882649.zip
Move absolute path generator to URI and use std::strings
(bzr r12977)
Diffstat (limited to 'src/uri-references.cpp')
-rw-r--r--src/uri-references.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/uri-references.cpp b/src/uri-references.cpp
index f2df55213..dc0101024 100644
--- a/src/uri-references.cpp
+++ b/src/uri-references.cpp
@@ -57,9 +57,11 @@ void URIReference::attach(const URI &uri) throw(BadURIException)
}
// The path contains references to seperate document files to load.
- const char *path = uri.getPath();
- if(path && document != NULL) {
- document = document->createChildDoc(path);
+ if(document && uri.getPath()) {
+ std::string base = std::string(g_strdup(document->getBase()));
+ std::string path = uri.getFullPath(base);
+ if(!path.empty())
+ document = document->createChildDoc(path);
}
if(!document) {
g_warning("Can't get document for referenced URI: %s", uri.toString());