Changeset 7611 in orxonox.OLD for branches/qt_gui/src/lib/util/loading/resource_manager.cc
- Timestamp:
- May 12, 2006, 4:15:39 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/qt_gui/src/lib/util/loading/resource_manager.cc
r7460 r7611 17 17 18 18 #include "util/loading/resource_manager.h" 19 19 #include "file.h" 20 20 #include "substring.h" 21 21 #include "debug.h" … … 60 60 61 61 this->dataDir = "./"; 62 this->_cwd = "";63 62 this->tryDataDir("./data"); 64 63 } … … 874 873 if (name[0] == '.' && name[1] != '.') 875 874 retName.erase(0); 876 const std::string& absDir = ResourceManager::cwd();875 const std::string& absDir = File::cwd(); 877 876 retName = absDir + retName; 878 877 } … … 896 895 else 897 896 return ""; 898 }899 900 #ifdef __unix__901 #include <unistd.h>902 #elif __WIN32__ || _MS_DOS_903 #include <dir.h>904 #else905 #include <direct.h> /* Visual C++ */906 #endif907 /**908 * @returns the Current Woring Directory909 */910 const std::string& ResourceManager::cwd()911 {912 if (ResourceManager::getInstance()->_cwd.empty())913 {914 char cwd[1024];915 char* errorCode = getcwd(cwd, 1024);916 if (errorCode == 0)917 return ResourceManager::getInstance()->_cwd;918 919 ResourceManager::getInstance()->_cwd = cwd;920 }921 return ResourceManager::getInstance()->_cwd;922 897 } 923 898
Note: See TracChangeset
for help on using the changeset viewer.