diff options
author | Brad King <brad.king@kitware.com> | 2013-02-15 18:11:27 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-02-15 18:11:27 (GMT) |
commit | c1dc80749440febf41c24329e0276e733a7220f2 (patch) | |
tree | c988fbc0c4360b31d188ce477b776531b8226a74 | |
parent | 0e2ed9b097275ce45f61def179b0d3c7d71b83fa (diff) | |
parent | f123367254c4737981af3e0641e5a4f388d0567d (diff) | |
download | CMake-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.cxx | 3 |
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()); } |