diff --git a/src/process_win.cpp b/src/process_win.cpp index 89b5a8f..bfd3699 100644 --- a/src/process_win.cpp +++ b/src/process_win.cpp @@ -96,6 +96,10 @@ Process::id_type Process::open(const std::string &command, const std::string &pa #ifdef MSYS_PROCESS_USE_SH size_t pos=0; std::string sh_command=command; + while((pos=sh_command.find('\\', pos))!=std::string::npos) { + sh_command.replace(pos, 1, "\\\\\\"); + pos+=3; + } while((pos=sh_command.find('\"', pos))!=std::string::npos) { if(pos>0 && sh_command[pos-1]!='\\') { sh_command.replace(pos, 1, "\\\"");