diff options
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 49a0e89..93bed9a 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -3020,8 +3020,7 @@ bool HandleCreateLinkCommand(std::vector<std::string> const& args, } // Check if the new file already exists and remove it. - if ((cmSystemTools::FileExists(newFileName) || - cmSystemTools::FileIsSymlink(newFileName)) && + if (cmSystemTools::PathExists(newFileName) && !cmSystemTools::RemoveFile(newFileName)) { std::ostringstream e; e << "Failed to create link '" << newFileName |