projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e641e8b
)
Open URis with spaces.
author
Robin Gareus
<robin@gareus.org>
Thu, 11 Feb 2016 15:43:35 +0000
(16:43 +0100)
committer
Robin Gareus
<robin@gareus.org>
Thu, 11 Feb 2016 15:43:35 +0000
(16:43 +0100)
libs/pbd/openuri.cc
patch
|
blob
|
history
diff --git
a/libs/pbd/openuri.cc
b/libs/pbd/openuri.cc
index 5f4f1ab5461cd83306a51a65ee43b7229aade13f..5e7e8f5a022bf653e3f08ebf9ecb069c40493c6b 100644
(file)
--- a/
libs/pbd/openuri.cc
+++ b/
libs/pbd/openuri.cc
@@
-57,8
+57,14
@@
PBD::open_uri (const char* uri)
global_epa->restore ();
}
+ std::string s(uri);
+ while (s.find("\\") != std::string::npos)
+ s.replace(s.find("\\"), 1, "\\\\");
+ while (s.find("\"") != std::string::npos)
+ s.replace(s.find("\\"), 1, "\\\"");
+
std::string command = "xdg-open ";
- command +=
uri
;
+ command +=
'"' + s + '"'
;
command += " &";
(void) system (command.c_str());