Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 5, 2009, 9:22:22 PM (14 years ago)
Author:
rgrieder
Message:

Synchronised sandbox with current code trunk. There should be a few bug fixes.

Location:
sandbox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox

  • sandbox/src/libraries/core/Language.cc

    r5738 r6038  
    3535
    3636#include <fstream>
    37 #include <boost/filesystem.hpp>
    38 
    3937#include "util/Debug.h"
    4038#include "Core.h"
     39#include "PathConfig.h"
    4140
    4241namespace orxonox
     
    200199        COUT(4) << "Read default language file." << std::endl;
    201200
    202         boost::filesystem::path filepath(Core::getConfigPath() / getFilename(this->defaultLanguage_));
     201        std::string filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_);
    203202
    204203        // This creates the file if it's not existing
    205204        std::ofstream createFile;
    206         createFile.open(filepath.string().c_str(), std::fstream::app);
     205        createFile.open(filepath.c_str(), std::fstream::app);
    207206        createFile.close();
    208207
    209208        // Open the file
    210209        std::ifstream file;
    211         file.open(filepath.string().c_str(), std::fstream::in);
     210        file.open(filepath.c_str(), std::fstream::in);
    212211
    213212        if (!file.is_open())
     
    249248        COUT(4) << "Read translated language file (" << Core::getLanguage() << ")." << std::endl;
    250249
    251         boost::filesystem::path filepath(Core::getConfigPath() / getFilename(Core::getLanguage()));
     250        std::string filepath = PathConfig::getConfigPathString() + getFilename(Core::getLanguage());
    252251
    253252        // Open the file
    254253        std::ifstream file;
    255         file.open(filepath.string().c_str(), std::fstream::in);
     254        file.open(filepath.c_str(), std::fstream::in);
    256255
    257256        if (!file.is_open())
     
    303302        COUT(4) << "Language: Write default language file." << std::endl;
    304303
    305         boost::filesystem::path filepath(Core::getConfigPath() / getFilename(this->defaultLanguage_));
     304        std::string filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_);
    306305
    307306        // Open the file
    308307        std::ofstream file;
    309         file.open(filepath.string().c_str(), std::fstream::out);
     308        file.open(filepath.c_str(), std::fstream::out);
    310309
    311310        if (!file.is_open())
Note: See TracChangeset for help on using the changeset viewer.