fix backslashes in quotes (windows), fixes VST scan

This commit is contained in:
Robin Gareus 2015-08-03 23:06:08 +02:00
parent 847afa3f64
commit e09c62052d

View file

@ -363,13 +363,10 @@ SystemExec::make_wargs(char **a) {
char **tmp = ++a; char **tmp = ++a;
while (tmp && *tmp) { while (tmp && *tmp) {
wa.append(" \""); wa.append(" \"");
std::string arg(*tmp); wa.append(*tmp);
size_t start_pos = 0; if (strlen(*tmp) > 0 && (*tmp)[strlen(*tmp) - 1] == '\\') {
while((start_pos = arg.find("\\", start_pos)) != std::string::npos) { wa.append("\\")
arg.replace(start_pos, 1, "\\\\");
start_pos += 2;
} }
wa.append(arg);
wa.append("\""); wa.append("\"");
tmp++; tmp++;
} }