Merge topic 'file-REMOVE_RECURSE-symlink'

f123367 file: Do not remove symlinked directories recursively (#10538)
This commit is contained in:
Brad King 2013-02-15 13:11:27 -05:00 committed by CMake Topic Stage
commit c1dc807494
1 changed files with 2 additions and 1 deletions

View File

@ -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());
}