diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-10-05 15:37:03 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-10-05 15:37:03 (GMT) |
commit | f9468a2967c037a8d1630673169cf3c772018f33 (patch) | |
tree | e712ab9454e55415f184acf3b17e1d7e43ac9cdf /Source/cmake.cxx | |
parent | 29794b24a995650725eecf67832cc803b0f34cf6 (diff) | |
download | CMake-f9468a2967c037a8d1630673169cf3c772018f33.zip CMake-f9468a2967c037a8d1630673169cf3c772018f33.tar.gz CMake-f9468a2967c037a8d1630673169cf3c772018f33.tar.bz2 |
FIX: correctly handle if path table can not open
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index f4e5848..340766e 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1519,9 +1519,14 @@ void cmake::UpdateConversionPathTable() if(tablepath) { std::ifstream table( tablepath ); - std::string a, b; - if( table.is_open() && table.good() ) + if(!table) { + cmSystemTools::Error("CMAKE_PATH_TRANSLATION_FILE set to ", tablepath, ". CMake can not open file."); + cmSystemTools::ReportLastSystemError("CMake can not open file."); + } + else + { + std::string a, b; while(!table.eof()) { // two entries per line |