summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index cdd0408..dfce033 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -845,8 +845,10 @@ bool HandleMakeDirectoryCommand(std::vector<std::string> const& args,
cmSystemTools::SetFatalErrorOccurred();
return false;
}
- if (!cmSystemTools::MakeDirectory(*cdir)) {
- std::string error = "problem creating directory: " + *cdir;
+ cmsys::Status mkdirStatus = cmSystemTools::MakeDirectory(*cdir);
+ if (!mkdirStatus) {
+ std::string error = cmStrCat("failed to create directory:\n ", *cdir,
+ "\nbecause: ", mkdirStatus.GetString());
status.SetError(error);
return false;
}