From e09c62052d31518c92a0a7a474a3743af1a01e07 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 3 Aug 2015 23:06:08 +0200 Subject: fix backslashes in quotes (windows), fixes VST scan --- libs/pbd/system_exec.cc | 9 +++------ 1 file 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++; } -- cgit v1.2.3