浏览代码

BUG: Fix for network path argument parsing.

Brad King 22 年之前
父节点
当前提交
185c82b6ad
共有 1 个文件被更改,包括 13 次插入2 次删除
  1. 13 2
      Source/MFCDialog/CMakeCommandLineInfo.cpp

+ 13 - 2
Source/MFCDialog/CMakeCommandLineInfo.cpp

@@ -57,12 +57,23 @@ int CMakeCommandLineInfo::GetBoolValue(const CString& v) {
 void CMakeCommandLineInfo::ParseParam(LPCTSTR lpszParam, BOOL bFlag, BOOL bLast)
 {
   // Construct the full name of the argument.
+  cmStdString param = lpszParam;
   cmStdString value;
   if(bFlag)
     {
-    value = "-";
+    // Since bFlag is set, either a - or a / was removed from the
+    // parameter value.  Assume it was a - unless the second character
+    // was a / which indicates a network path argument.
+    if(param.length() > 0 && param[0] == '/')
+      {
+      value = "/";
+      }
+    else
+      {
+      value = "-";
+      }
     }
-  value += lpszParam;
+  value += param;
   
   // Add the argument and reset the argv table in case strings were
   // moved.