Changeset 5837 for code/branches/core5/src/libraries/core/Language.cc
- Timestamp:
- Sep 30, 2009, 12:13:01 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/libraries/core/Language.cc
r5836 r5837 35 35 36 36 #include <fstream> 37 #include <boost/filesystem.hpp>38 39 37 #include "util/Debug.h" 40 38 #include "Core.h" … … 201 199 COUT(4) << "Read default language file." << std::endl; 202 200 203 boost::filesystem::path filepath(PathConfig::getConfigPath() / getFilename(this->defaultLanguage_));201 std::string filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_); 204 202 205 203 // This creates the file if it's not existing 206 204 std::ofstream createFile; 207 createFile.open(filepath. string().c_str(), std::fstream::app);205 createFile.open(filepath.c_str(), std::fstream::app); 208 206 createFile.close(); 209 207 210 208 // Open the file 211 209 std::ifstream file; 212 file.open(filepath. string().c_str(), std::fstream::in);210 file.open(filepath.c_str(), std::fstream::in); 213 211 214 212 if (!file.is_open()) … … 250 248 COUT(4) << "Read translated language file (" << Core::getLanguage() << ")." << std::endl; 251 249 252 boost::filesystem::path filepath(PathConfig::getConfigPath() / getFilename(Core::getLanguage()));250 std::string filepath = PathConfig::getConfigPathString() + getFilename(Core::getLanguage()); 253 251 254 252 // Open the file 255 253 std::ifstream file; 256 file.open(filepath. string().c_str(), std::fstream::in);254 file.open(filepath.c_str(), std::fstream::in); 257 255 258 256 if (!file.is_open()) … … 304 302 COUT(4) << "Language: Write default language file." << std::endl; 305 303 306 boost::filesystem::path filepath(PathConfig::getConfigPath() / getFilename(this->defaultLanguage_));304 std::string filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_); 307 305 308 306 // Open the file 309 307 std::ofstream file; 310 file.open(filepath. string().c_str(), std::fstream::out);308 file.open(filepath.c_str(), std::fstream::out); 311 309 312 310 if (!file.is_open())
Note: See TracChangeset
for help on using the changeset viewer.