summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-08-03 23:06:08 +0200
committerRobin Gareus <robin@gareus.org>2015-08-03 23:06:08 +0200
commite09c62052d31518c92a0a7a474a3743af1a01e07 (patch)
tree203086ffe27d90fe1941bc5fd155249accaadfa5
parent847afa3f649d5ef380104e34585e1303a13bc904 (diff)
fix backslashes in quotes (windows), fixes VST scan
-rw-r--r--libs/pbd/system_exec.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/libs/pbd/system_exec.cc b/libs/pbd/system_exec.cc
index 721db98a7e..0602805db6 100644
--- a/libs/pbd/system_exec.cc
+++ b/libs/pbd/system_exec.cc
@@ -363,13 +363,10 @@ SystemExec::make_wargs(char **a) {
char **tmp = ++a;
while (tmp && *tmp) {
wa.append(" \"");
- std::string arg(*tmp);
- size_t start_pos = 0;
- while((start_pos = arg.find("\\", start_pos)) != std::string::npos) {
- arg.replace(start_pos, 1, "\\\\");
- start_pos += 2;
+ wa.append(*tmp);
+ if (strlen(*tmp) > 0 && (*tmp)[strlen(*tmp) - 1] == '\\') {
+ wa.append("\\")
}
- wa.append(arg);
wa.append("\"");
tmp++;
}