diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2018-11-05 19:41:55 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2018-11-05 22:35:47 +0000 |
| commit | 5b8cb9394c8e01763d300dbb57a7ded19edf96b1 (patch) | |
| tree | 99116cb59d1102c80e48022251d50718523a485f /src/object | |
| parent | ContextMenu: Harmonize with menu bar (diff) | |
| download | inkscape-5b8cb9394c8e01763d300dbb57a7ded19edf96b1.tar.gz inkscape-5b8cb9394c8e01763d300dbb57a7ded19edf96b1.zip | |
fix URI::from_dirname("/")
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/uri.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/object/uri.cpp b/src/object/uri.cpp index ce0953501..7c5ab657e 100644 --- a/src/object/uri.cpp +++ b/src/object/uri.cpp @@ -290,7 +290,12 @@ URI URI::from_dirname(gchar const *path) pathstr = Glib::build_filename(Glib::get_current_dir(), pathstr); } - auto uristr = Glib::filename_to_uri(pathstr) + "/"; + auto uristr = Glib::filename_to_uri(pathstr); + + if (uristr[uristr.size() - 1] != '/') { + uristr.push_back('/'); + } + return URI(uristr.c_str()); } |
