diff options
Diffstat (limited to 'src/extension/system.cpp')
| -rw-r--r-- | src/extension/system.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/extension/system.cpp b/src/extension/system.cpp index 476499385..fc20095c5 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -74,6 +74,16 @@ SPDocument *open(Extension *key, gchar const *filename) relpath &= (filename[0] != '\\') && !(isalpha(filename[0]) && (filename[1] == ':')); #endif + // Do not consider an URI as a relative path. + if (relpath) { + gchar const * cp = filename; + + while (isalpha(*cp) || isdigit(*cp) || *cp == '+' || *cp == '-' || *cp == '.') + cp++; + + relpath = *cp != ':' || cp[1] != '/' || cp[2] != '/'; + } + if (relpath) { gchar * curdir = NULL; #ifndef WIN32 |
