summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmFileCommand.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 0cdbb82..018ce7e 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2409,7 +2409,8 @@ bool cmFileCommand::HandleRemove(std::vector<std::string> const& args,
fileName += "/" + *i;
}
- if(cmSystemTools::FileIsDirectory(fileName.c_str()) && recurse)
+ if(cmSystemTools::FileIsDirectory(fileName.c_str()) &&
+ !cmSystemTools::FileIsSymlink(fileName.c_str()) && recurse)
{
cmSystemTools::RemoveADirectory(fileName.c_str());
}