Changeset 5695 for code/trunk/src/core/ConfigFileManager.cc
- Timestamp:
- Aug 30, 2009, 2:22:00 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/resource2 (added) merged: 3373-3374,5594,5597,5610-5611,5614,5624,5641,5644-5646,5650-5664,5667-5672,5682-5684,5688-5691,5694
- Property svn:mergeinfo changed
-
code/trunk/src/core/ConfigFileManager.cc
r3370 r5695 40 40 namespace orxonox 41 41 { 42 const char* const DEFAULT_CONFIG_FILE = "default.ini";43 44 ConfigFileManager* ConfigFileManager::singletonPtr_s = 0;45 46 42 SetConsoleCommandShortcutExtern(config).argumentCompleter(0, autocompletion::configvalueclasses()).argumentCompleter(1, autocompletion::configvalues()).argumentCompleter(2, autocompletion::configvalue()); 47 43 SetConsoleCommandShortcutExtern(tconfig).argumentCompleter(0, autocompletion::configvalueclasses()).argumentCompleter(1, autocompletion::configvalues()).argumentCompleter(2, autocompletion::configvalue()); … … 229 225 if (!boost::filesystem::exists(filepath)) 230 226 { 231 // Try to get default one from the media folder232 boost::filesystem::path defaultFilepath(Core::get MediaPath() / "defaultConfig" / this->filename_);227 // Try to get default one from the data folder 228 boost::filesystem::path defaultFilepath(Core::getDataPath() / "defaultConfig" / this->filename_); 233 229 if (boost::filesystem::exists(defaultFilepath)) 234 230 { … … 339 335 void ConfigFile::save() const 340 336 { 341 boost::filesystem::path filepath(Core::getConfigPath() / this->filename_);342 343 337 std::ofstream file; 344 file.open( filepath.string().c_str(), std::fstream::out);338 file.open((Core::getConfigPathString() + filename_).c_str(), std::fstream::out); 345 339 file.setf(std::ios::fixed, std::ios::floatfield); 346 340 file.precision(6); … … 479 473 /////////////////////// 480 474 475 ConfigFileManager* ConfigFileManager::singletonPtr_s = 0; 476 477 std::string ConfigFileManager::DEFAULT_CONFIG_FILE = "default.ini"; 478 481 479 ConfigFileManager::ConfigFileManager() 482 480 : mininmalFreeType_(ConfigFileType::numberOfReservedTypes)
Note: See TracChangeset
for help on using the changeset viewer.