Changeset 4295 in orxonox.OLD for orxonox/branches/physics/src/util
- Timestamp:
- May 26, 2005, 11:05:01 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/util/resource_manager.cc
r4223 r4295 87 87 bool ResourceManager::setDataDir(const char* dataDir) 88 88 { 89 if (isDir(dataDir)) 89 char* checkDir = ResourceManager::homeDirCheck(dataDir); 90 if (isDir(checkDir)) 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(checkDir)+1]; 94 strcpy(this->dataDir, checkDir); 95 delete checkDir; 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 checkDir; 99 102 return false; 100 103 }
Note: See TracChangeset
for help on using the changeset viewer.