- Timestamp:
- May 27, 2005, 9:27:27 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/resource_manager.cc
r4320 r4341 87 87 bool ResourceManager::setDataDir(const char* dataDir) 88 88 { 89 if (isDir(dataDir)) 89 char* realDir = ResourceManager::homeDirCheck(dataDir); 90 if (isDir(realDir)) 90 91 { 91 92 delete this->dataDir; 92 this->dataDir = new char[strlen(dataDir)+1]; 93 strcpy(this->dataDir, dataDir); 93 this->dataDir = new char[strlen(realDir)+1]; 94 strcpy(this->dataDir, realDir); 95 delete realDir; 94 96 return true; 95 97 } … … 97 99 { 98 100 PRINTF(1)("%s is not a Directory, and can not be the Data Directory, leaving as %s \n", dataDir, this->dataDir); 101 delete realDir; 99 102 return false; 100 103 }
Note: See TracChangeset
for help on using the changeset viewer.