From 185c82b6adbf8f7186ff63eea27e06ed319aaa6e Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Jul 2003 11:24:05 -0400 Subject: [PATCH] BUG: Fix for network path argument parsing. --- Source/MFCDialog/CMakeCommandLineInfo.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Source/MFCDialog/CMakeCommandLineInfo.cpp b/Source/MFCDialog/CMakeCommandLineInfo.cpp index b5e7203ac..f638de6bf 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.