Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4341 in orxonox.OLD for orxonox


Ignore:
Timestamp:
May 27, 2005, 9:27:27 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: small folder-check-update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/resource_manager.cc

    r4320 r4341  
    8787bool ResourceManager::setDataDir(const char* dataDir)
    8888{
    89   if (isDir(dataDir))
     89  char* realDir = ResourceManager::homeDirCheck(dataDir);
     90  if (isDir(realDir))
    9091    {
    9192      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;
    9496      return true;
    9597    }
     
    9799    {
    98100      PRINTF(1)("%s is not a Directory, and can not be the Data Directory, leaving as %s \n", dataDir, this->dataDir);
     101      delete realDir;
    99102      return false;
    100103    }
Note: See TracChangeset for help on using the changeset viewer.