Changeset 5929 for code/trunk/src/libraries/core/Language.cc
- Timestamp:
- Oct 12, 2009, 8:20:07 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core5 (added) merged: 5768-5769,5772,5775-5780,5783-5785,5791-5792,5795-5807,5809-5814,5816-5832,5836-5839,5842-5853,5855-5899,5904-5922,5924-5928
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/Language.cc
r5738 r5929 35 35 36 36 #include <fstream> 37 #include <boost/filesystem.hpp>38 39 37 #include "util/Debug.h" 40 38 #include "Core.h" 39 #include "PathConfig.h" 41 40 42 41 namespace orxonox … … 200 199 COUT(4) << "Read default language file." << std::endl; 201 200 202 boost::filesystem::path filepath(Core::getConfigPath() / getFilename(this->defaultLanguage_));201 std::string filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_); 203 202 204 203 // This creates the file if it's not existing 205 204 std::ofstream createFile; 206 createFile.open(filepath. string().c_str(), std::fstream::app);205 createFile.open(filepath.c_str(), std::fstream::app); 207 206 createFile.close(); 208 207 209 208 // Open the file 210 209 std::ifstream file; 211 file.open(filepath. string().c_str(), std::fstream::in);210 file.open(filepath.c_str(), std::fstream::in); 212 211 213 212 if (!file.is_open()) … … 249 248 COUT(4) << "Read translated language file (" << Core::getLanguage() << ")." << std::endl; 250 249 251 boost::filesystem::path filepath(Core::getConfigPath() / getFilename(Core::getLanguage()));250 std::string filepath = PathConfig::getConfigPathString() + getFilename(Core::getLanguage()); 252 251 253 252 // Open the file 254 253 std::ifstream file; 255 file.open(filepath. string().c_str(), std::fstream::in);254 file.open(filepath.c_str(), std::fstream::in); 256 255 257 256 if (!file.is_open()) … … 303 302 COUT(4) << "Language: Write default language file." << std::endl; 304 303 305 boost::filesystem::path filepath(Core::getConfigPath() / getFilename(this->defaultLanguage_));304 std::string filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_); 306 305 307 306 // Open the file 308 307 std::ofstream file; 309 file.open(filepath. string().c_str(), std::fstream::out);308 file.open(filepath.c_str(), std::fstream::out); 310 309 311 310 if (!file.is_open())
Note: See TracChangeset
for help on using the changeset viewer.