This commit is contained in:
Robin Gareus 2016-02-14 00:02:00 +01:00
parent 48532baaa7
commit 09167d3e59

View file

@ -217,7 +217,7 @@ SystemExec::SystemExec (std::string command, const std::map<char, std::string> s
while (tmp.find("\"") != std::string::npos) while (tmp.find("\"") != std::string::npos)
tmp.replace(s.find("\""), 1, "\\\""); tmp.replace(s.find("\""), 1, "\\\"");
wa += " \""; wa += " \"";
wa += tmp wa += tmp;
wa += '"'; wa += '"';
} }
w_args = strdup(wa.c_str()); w_args = strdup(wa.c_str());
@ -339,7 +339,7 @@ string
SystemExec::to_s () const SystemExec::to_s () const
{ {
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS
return string (w_args ? w_args :: ""); return string (w_args ? w_args : "");
#else #else
stringstream out; stringstream out;
if (argp) { if (argp) {