summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 795208d..fb2f297 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -345,9 +345,17 @@ std::string cmSystemTools::EscapeSpaces(const char* str)
std::string temp = str;
if (temp.find(" ") != std::string::npos)
{
- result = "\"";
+ // don't add quotes if they're already there
+ if (temp.find("\"")==std::string::npos)
+ {
+ result = "\"";
+ }
result += cmSystemTools::HandleNetworkPaths(str);
- return result+"\"";
+ if (temp.find("\"")==std::string::npos)
+ {
+ result += "\"";
+ }
+ return result;
}
return cmSystemTools::HandleNetworkPaths(str);