Merge topic 'file-REMOVE_RECURSE-symlink'
f123367
file: Do not remove symlinked directories recursively (#10538)
This commit is contained in:
commit
c1dc807494
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue