From: Chris Elliott Date: Mon, 24 Jun 2002 20:09:46 +0000 (+0000) Subject: a fix to preserve UNC paths when creating the commandline argument array X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/009f8ef4a39cc0580a96eff0235dca4fe6afd063 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 --- diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index b25e322760..fd6c8f6c54 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -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;