summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 22898ad..245b084 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -341,9 +341,16 @@ std::string cmSystemTools::EscapeSpaces(const char* str)
#if defined(_WIN32) && !defined(__CYGWIN__)
std::string result;
- result = "\"";
- result += cmSystemTools::HandleNetworkPaths(str);
- return result+"\"";
+ // if there are spaces
+ std::string temp = str;
+ if (temp.find(" ") != std::string::npos)
+ {
+ result = "\"";
+ result += cmSystemTools::HandleNetworkPaths(str);
+ return result+"\"";
+ }
+ return cmSystemTools::HandleNetworkPaths(str);
+
#else
std::string result = "";
for(const char* ch = str; *ch != '\0'; ++ch)