summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-02-15 18:11:27 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-02-15 18:11:27 (GMT)
commitc1dc80749440febf41c24329e0276e733a7220f2 (patch)
treec988fbc0c4360b31d188ce477b776531b8226a74
parent0e2ed9b097275ce45f61def179b0d3c7d71b83fa (diff)
parentf123367254c4737981af3e0641e5a4f388d0567d (diff)
downloadCMake-c1dc80749440febf41c24329e0276e733a7220f2.zip
CMake-c1dc80749440febf41c24329e0276e733a7220f2.tar.gz
CMake-c1dc80749440febf41c24329e0276e733a7220f2.tar.bz2
Merge topic 'file-REMOVE_RECURSE-symlink'
f123367 file: Do not remove symlinked directories recursively (#10538)
-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());
}