summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-24 19:37:48 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-24 19:37:48 (GMT)
commit02b1767e429ed986a851a7238dbca0e306ff1c5f (patch)
tree64139d389bd01da5087ebefea0c6f23eb8ac26ed
parent3a462fa6739563cb059299d6956b41f6a828612d (diff)
downloadCMake-02b1767e429ed986a851a7238dbca0e306ff1c5f.zip
CMake-02b1767e429ed986a851a7238dbca0e306ff1c5f.tar.gz
CMake-02b1767e429ed986a851a7238dbca0e306ff1c5f.tar.bz2
BUG: Make cmake -E remove_directory work when directory is not present.
-rw-r--r--Source/cmake.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 7989a0e..b5bf0dc 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -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";