diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx index 024ed21fd..57846568e 100644 --- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx +++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx @@ -29,7 +29,9 @@ bool cmCTestEmptyBinaryDirectoryCommand::InitialPass( if ( !cmCTestScriptHandler::EmptyBinaryDirectory(args[0].c_str()) ) { - this->SetError("problem removing the binary directory"); + cmOStringStream ostr; + ostr << "problem removing the binary directory: " << args[0].c_str(); + this->SetError(ostr.str().c_str()); return false; } diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index f5c45072f..157ea5508 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -2044,7 +2044,11 @@ kwsys_stl::string SystemTools bool SystemTools::FileIsDirectory(const char* name) { struct stat fs; +#if _WIN32 if(stat(name, &fs) == 0) +#else + if(lstat(name, &fs) == 0) +#endif { #if _WIN32 return ((fs.st_mode & _S_IFDIR) != 0);