Changeset 2438 for XIOS3/trunk/src/cxios.cpp
- Timestamp:
- 12/07/22 13:07:07 (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS3/trunk/src/cxios.cpp
r2420 r2438 15 15 #include "servers_ressource.hpp" 16 16 #include "mem_checker.hpp" 17 #include <unistd.h> 17 18 18 19 namespace xios … … 71 72 { 72 73 set_new_handler(noMemory); 74 char startPath[256]; 75 getcwd(startPath, sizeof(startPath)); 76 if(const char* userPath = std::getenv("XIOS_IODEF_PATH")) 77 { 78 if ( chdir( userPath ) != 0) 79 { 80 ERROR("CXios::initialize()", << "XIOS_IODEF_PATH not defined correctly : " << userPath << endl ); 81 } 82 } 73 83 parseFile(rootFile); 74 84 parseXiosConfig(); 85 chdir( startPath ); 75 86 } 76 87 … … 199 210 std::set<StdString> parseList; 200 211 parseList.insert("xios"); 212 char startPath[256]; 213 getcwd(startPath, sizeof(startPath)); 214 if(const char* userPath = std::getenv("XIOS_IODEF_PATH")) 215 { 216 if ( chdir( userPath ) != 0) 217 { 218 ERROR("CXios::initialize()", << "XIOS_IODEF_PATH not defined correctly : " << userPath << endl ); 219 } 220 } 201 221 xml::CXMLParser::ParseFile(rootFile, parseList); 202 222 parseXiosConfig(); 223 chdir( startPath ); 203 224 } 204 225
Note: See TracChangeset
for help on using the changeset viewer.