diff --git a/apps/launcher/maindialog.cpp b/apps/launcher/maindialog.cpp index 9bf135e7e..8738dae2c 100644 --- a/apps/launcher/maindialog.cpp +++ b/apps/launcher/maindialog.cpp @@ -385,8 +385,8 @@ bool Launcher::MainDialog::setupGraphicsSettings() // the filenames should be in the CfgMgr component. // Create the settings manager and load default settings file - const std::string localDefault = mCfgMgr.getLocalPath().string() + "settings-default.cfg"; - const std::string globalDefault = mCfgMgr.getGlobalPath().string() + "settings-default.cfg"; + const std::string localDefault = (mCfgMgr.getLocalPath() / "settings-default.cfg").string(); + const std::string globalDefault = (mCfgMgr.getGlobalPath() / "settings-default.cfg").string(); std::string defaultPath; // Prefer the settings-default.cfg in the current directory. @@ -414,7 +414,7 @@ bool Launcher::MainDialog::setupGraphicsSettings() } // Load user settings if they exist - const std::string userPath = mCfgMgr.getUserConfigPath().string() + "settings.cfg"; + const std::string userPath = (mCfgMgr.getUserConfigPath() / "settings.cfg").string(); // User settings are not required to exist, so if they don't we're done. if (!boost::filesystem::exists(userPath)) return true; @@ -498,7 +498,7 @@ bool Launcher::MainDialog::writeSettings() file.close(); // Graphics settings - const std::string settingsPath = mCfgMgr.getUserConfigPath().string() + "settings.cfg"; + const std::string settingsPath = (mCfgMgr.getUserConfigPath() / "settings.cfg").string(); try { mEngineSettings.saveUser(settingsPath); } diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index a4f5f9440..66231dd98 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -298,8 +298,8 @@ void OMW::Engine::setSkipMenu (bool skipMenu, bool newGame) std::string OMW::Engine::loadSettings (Settings::Manager & settings) { // Create the settings manager and load default settings file - const std::string localdefault = mCfgMgr.getLocalPath().string() + "settings-default.cfg"; - const std::string globaldefault = mCfgMgr.getGlobalPath().string() + "settings-default.cfg"; + const std::string localdefault = (mCfgMgr.getLocalPath() / "settings-default.cfg").string(); + const std::string globaldefault = (mCfgMgr.getGlobalPath() / "settings-default.cfg").string(); // prefer local if (boost::filesystem::exists(localdefault)) @@ -310,7 +310,7 @@ std::string OMW::Engine::loadSettings (Settings::Manager & settings) throw std::runtime_error ("No default settings file found! Make sure the file \"settings-default.cfg\" was properly installed."); // load user settings if they exist - const std::string settingspath = mCfgMgr.getUserConfigPath().string() + "settings.cfg"; + const std::string settingspath = (mCfgMgr.getUserConfigPath() / "settings.cfg").string(); if (boost::filesystem::exists(settingspath)) settings.loadUser(settingspath);