From b59dd02911bfc81d6cb4f4ea181a9dfe34c6bc8e Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Wed, 13 Apr 2005 18:13:09 -0400 Subject: [PATCH] ENH: For sanity, create directory before creating generated file stream --- Source/cmGeneratedFileStream.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index 8aa51f754..d70bc5c0a 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -146,6 +146,9 @@ void cmGeneratedFileStreamBase::Open(const char* name) // Make sure the temporary file that will be used is not present. cmSystemTools::RemoveFile(m_TempName.c_str()); + + std::string dir = cmSystemTools::GetFilenamePath(m_TempName); + cmSystemTools::MakeDirectory(dir.c_str()); } //----------------------------------------------------------------------------