mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 14:23:10 -05:00
BUG: Make cmake -E remove_directory work when directory is not present.
This commit is contained in:
+2
-1
@@ -1027,7 +1027,8 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
|
||||
|
||||
else if (args[1] == "remove_directory" && args.size() == 3)
|
||||
{
|
||||
if(!cmSystemTools::RemoveADirectory(args[2].c_str()))
|
||||
if(cmSystemTools::FileIsDirectory(args[2].c_str()) &&
|
||||
!cmSystemTools::RemoveADirectory(args[2].c_str()))
|
||||
{
|
||||
std::cerr << "Error removing directory \"" << args[2].c_str()
|
||||
<< "\".\n";
|
||||
|
||||
Reference in New Issue
Block a user