X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/31f6de22b0575e7feac83e7f99b5774a3490fc1a..c35c7d01d48e3d8a93f747f120326cde7fe9b42d:/src/common/cmdline.cpp diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index 142cf53dad..efb4a3e966 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -1015,7 +1015,7 @@ wxArrayString wxCmdLineParser::ConvertStringToArgs(const wxChar *p) case _T(' '): case _T('\t'): - if ( isInsideQuotes ) + if ( isInsideQuotes || isQuotedByBS ) { // preserve it, skip endParam below break; @@ -1025,6 +1025,15 @@ wxArrayString wxCmdLineParser::ConvertStringToArgs(const wxChar *p) case _T('\0'): endParam = TRUE; break; + + default: + if ( isQuotedByBS ) + { + // ignore backslash before an ordinary character - this + // is needed to properly handle the file names under + // Windows appearing in the command line + arg += _T('\\'); + } } // end of argument?