Changeset 2685 for code/branches/buildsystem3/src/core/ConfigFileManager.cc
- Timestamp:
- Feb 20, 2009, 5:32:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem3/src/core/ConfigFileManager.cc
r2662 r2685 30 30 31 31 #include <cassert> 32 #include <boost/filesystem.hpp> 33 32 34 #include "util/Convert.h" 33 35 #include "util/String.h" 34 36 #include "ConsoleCommand.h" 35 37 #include "ConfigValueContainer.h" 38 #include "Core.h" 36 39 37 40 namespace orxonox … … 223 226 this->clear(); 224 227 228 boost::filesystem::path filepath(Core::getConfigPath() + "/" + this->filename_); 229 225 230 // This creates the config file if it's not existing 226 231 std::ofstream createFile; 227 createFile.open( this->filename_.c_str(), std::fstream::app);232 createFile.open(filepath.native_file_string().c_str(), std::fstream::app); 228 233 createFile.close(); 229 234 230 235 // Open the file 231 236 std::ifstream file; 232 file.open( this->filename_.c_str(), std::fstream::in);237 file.open(filepath.native_file_string().c_str(), std::fstream::in); 233 238 234 239 if (!file.is_open()) … … 337 342 void ConfigFile::save() const 338 343 { 344 boost::filesystem::path filepath(Core::getConfigPath() + "/" + this->filename_); 345 339 346 std::ofstream file; 340 file.open( this->filename_.c_str(), std::fstream::out);347 file.open(filepath.native_file_string().c_str(), std::fstream::out); 341 348 file.setf(std::ios::fixed, std::ios::floatfield); 342 349 file.precision(6);
Note: See TracChangeset
for help on using the changeset viewer.