Changeset 5837 for code/branches/core5/src
- Timestamp:
- Sep 30, 2009, 12:13:01 AM (15 years ago)
- Location:
- code/branches/core5/src/libraries/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/libraries/core/CommandLine.cc
r5836 r5837 31 31 #include <algorithm> 32 32 #include <sstream> 33 #include <boost/filesystem.hpp>34 33 35 34 #include "util/Convert.h" … … 348 347 { 349 348 std::string filename = CommandLine::getValue("optionsFile").getString(); 350 boost::filesystem::path filepath(PathConfig::getConfigPath() / filename);351 349 352 350 // look for additional arguments in given file or start.ini as default 353 351 // They will not overwrite the arguments given directly 354 352 std::ifstream file; 355 file.open( filepath.string().c_str());353 file.open((PathConfig::getConfigPathString() + filename).c_str()); 356 354 std::vector<std::string> args; 357 355 if (file) -
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.