a fix to preserve UNC paths when creating the commandline argument array
tested with Borland/wxMSW; existing behaviour of replacing \\ with \ preserved except at start of string git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1040,7 +1040,8 @@ wxArrayString wxCmdLineParser::ConvertStringToArgs(const wxChar *p)
|
|||||||
p++;
|
p++;
|
||||||
|
|
||||||
// if we have 2 backslashes in a row, output one
|
// 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('\\');
|
arg += _T('\\');
|
||||||
isQuotedByBS = FALSE;
|
isQuotedByBS = FALSE;
|
||||||
|
Reference in New Issue
Block a user