summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/svg.cpp
diff options
context:
space:
mode:
authorPatrick Storz <eduard.braun2@gmx.de>2019-05-03 18:14:16 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-05-03 18:21:10 +0000
commit487129e4efe7062444f89c3870b85a11c21f26f9 (patch)
tree70140184a00b73bf9aac7ec85339ac133bdf2c3d /src/extension/internal/svg.cpp
parentAdds out of bound check for selecting text on path (diff)
downloadinkscape-487129e4efe7062444f89c3870b85a11c21f26f9.tar.gz
inkscape-487129e4efe7062444f89c3870b85a11c21f26f9.zip
Fix opening of files on Windows (and possibly elsewhere)
What we pass as "uri" is not an URI, it usually seems to be a file path, so we were lucky it "accidentally" used to work before. Replace Gio::File::create_for_uri with Gio::File::create_for_commandline_arg which should handle both URIs and absolute paths reliably.
Diffstat (limited to 'src/extension/internal/svg.cpp')
-rw-r--r--src/extension/internal/svg.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/extension/internal/svg.cpp b/src/extension/internal/svg.cpp
index 2e21ef272..e473f0df4 100644
--- a/src/extension/internal/svg.cpp
+++ b/src/extension/internal/svg.cpp
@@ -704,7 +704,7 @@ SPDocument *
Svg::open (Inkscape::Extension::Input *mod, const gchar *uri)
{
// This is only used at the end... but it should go here once uri stuff is fixed.
- auto file = Gio::File::create_for_uri(uri);
+ auto file = Gio::File::create_for_commandline_arg(uri);
const auto path = file->get_path();
// Fixing this means fixing a whole string of things.