From f180a834bff54c51d7d30612249ebca4df39657c Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 29 Apr 2009 08:46:56 -0400 Subject: [PATCH] BUG: Error when install dir cannot be created This teaches the undocumented file(INSTALL) command to report an error when it cannot create the destination directory. --- Source/cmFileCommand.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index b3c3ac165..d29e421c4 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1192,6 +1192,10 @@ bool cmFileInstaller::InstallDirectory(const char* source, // Make sure the destination directory exists. if(!cmSystemTools::MakeDirectory(destination)) { + cmOStringStream e; + e << "INSTALL cannot make directory \"" << destination << "\": " + << cmSystemTools::GetLastSystemError(); + this->FileCommand->SetError(e.str().c_str()); return false; }