summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-07-24 15:24:05 (GMT)
committerBrad King <brad.king@kitware.com>2003-07-24 15:24:05 (GMT)
commit185c82b6adbf8f7186ff63eea27e06ed319aaa6e (patch)
tree06ae4be566171eba8a755c93a9e49d99c9bb61d2 /Source
parentd720b2bc723d6c5810abf0809adfbbbb46edd044 (diff)
downloadCMake-185c82b6adbf8f7186ff63eea27e06ed319aaa6e.zip
CMake-185c82b6adbf8f7186ff63eea27e06ed319aaa6e.tar.gz
CMake-185c82b6adbf8f7186ff63eea27e06ed319aaa6e.tar.bz2
BUG: Fix for network path argument parsing.
Diffstat (limited to 'Source')
-rw-r--r--Source/MFCDialog/CMakeCommandLineInfo.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/MFCDialog/CMakeCommandLineInfo.cpp b/Source/MFCDialog/CMakeCommandLineInfo.cpp
index b5e7203..f638de6 100644
--- a/Source/MFCDialog/CMakeCommandLineInfo.cpp
+++ b/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.