Changeset 2439 for XIOS2/trunk/src/cxios.cpp
- Timestamp:
- 12/07/22 13:42:55 (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS2/trunk/src/cxios.cpp
r2428 r2439 7 7 #include <boost/functional/hash.hpp> 8 8 #include "mpi.hpp" 9 #include <unistd.h> 9 10 #include "memory.hpp" 10 11 #include <new> … … 52 53 { 53 54 set_new_handler(noMemory); 55 char startPath[256]; 56 getcwd(startPath, sizeof(startPath)); 57 if(const char* userPath = std::getenv("XIOS_IODEF_PATH")) 58 { 59 if ( chdir( userPath ) != 0) 60 { 61 ERROR("CXios::initialize()", << "XIOS_IODEF_PATH not defined correctly : " << userPath << endl ); 62 } 63 } 54 64 parseFile(rootFile); 55 65 parseXiosConfig(); 66 chdir( startPath ); 56 67 } 57 68 … … 174 185 std::set<StdString> parseList; 175 186 parseList.insert("xios"); 187 char startPath[256]; 188 getcwd(startPath, sizeof(startPath)); 189 if(const char* userPath = std::getenv("XIOS_IODEF_PATH")) 190 { 191 if ( chdir( userPath ) != 0) 192 { 193 ERROR("CXios::initialize()", << "XIOS_IODEF_PATH not defined correctly : " << userPath << endl ); 194 } 195 } 176 196 xml::CXMLParser::ParseFile(rootFile, parseList); 177 197 parseXiosConfig(); 198 chdir( startPath ); 178 199 } 179 200
Note: See TracChangeset
for help on using the changeset viewer.