Open URis with spaces.
This commit is contained in:
parent
e641e8b1a3
commit
2429308bac
@ -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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user