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.
This commit is contained in:
Brad King 2009-04-29 08:46:56 -04:00
parent dc0621ba5a
commit f180a834bf

View File

@ -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;
}