X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8c9892c2a8c2d0e06e1823e375bdec6ec58fe828..1fd1922a49351a377bc6ef8f7e00f150112ee096:/src/common/cmdline.cpp?ds=inline diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index 2c5ea56421..fd6c8f6c54 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -990,7 +990,7 @@ static wxString GetTypeName(wxCmdLineParamType type) /* This function is mainly used under Windows (as under Unix we always get the - command line arguments as agrc/argv anyhow) and so it tries to handle the + command line arguments as argc/argv anyhow) and so it tries to handle the Windows path names (separated by backslashes) correctly. For this it only considers that a backslash may be used to escape another backslash (but normally this is _not_ needed) or a quote but nothing else. @@ -1040,7 +1040,8 @@ wxArrayString wxCmdLineParser::ConvertStringToArgs(const wxChar *p) p++; // if we have 2 backslashes in a row, output one - if ( isQuotedByBS ) + // unless it looks like a UNC path \\machine\dir\file.ext + if ( isQuotedByBS || arg.Len() == 0 ) { arg += _T('\\'); isQuotedByBS = FALSE;