]> git.saurik.com Git - wxWidgets.git/commitdiff
a fix to preserve UNC paths when creating the commandline argument array
authorChris Elliott <biol75@york.ac.uk>
Mon, 24 Jun 2002 20:09:46 +0000 (20:09 +0000)
committerChris Elliott <biol75@york.ac.uk>
Mon, 24 Jun 2002 20:09:46 +0000 (20:09 +0000)
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

src/common/cmdline.cpp

index b25e322760577f546f8d483e58dedd92c7906b09..fd6c8f6c54c3f81a367d7561ce2c6d7abec85f77 100644 (file)
@@ -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;