Changeset 4167 in orxonox.OLD for orxonox/trunk
- Timestamp:
- May 11, 2005, 3:14:03 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/resource_manager.cc
r4166 r4167 643 643 /** 644 644 \param fileName the Name of the File to check 645 \returns The full name of the file, including the DataDir 645 \returns The full name of the file, including the DataDir, and NULL if the file does not exist 646 646 IMPORTANT: this has to be deleted from the outside 647 647 */ … … 650 650 char* retName = new char[strlen(ResourceManager::getInstance()->getDataDir()) + strlen(fileName)+1]; 651 651 sprintf(retName, "%s%s", ResourceManager::getInstance()->getDataDir(), fileName); 652 return retName; 652 if (ResourceManager::isFile(retName)) 653 return retName; 654 else 655 { 656 delete retName; 657 return NULL; 658 } 653 659 } 654 660
Note: See TracChangeset
for help on using the changeset viewer.