Changeset 6038 for sandbox/src/libraries/core/Language.cc
- Timestamp:
- Nov 5, 2009, 9:22:22 PM (14 years ago)
- Location:
- sandbox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox
- Property svn:mergeinfo changed
-
sandbox/src/libraries/core/Language.cc
r5738 r6038 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.