diff --git a/src/backend/game/game.cpp b/src/backend/game/game.cpp index d9c67ad9..dd1012bb 100644 --- a/src/backend/game/game.cpp +++ b/src/backend/game/game.cpp @@ -66,7 +66,15 @@ namespace loot { } if (createFolder) { - CreateLOOTGameFolder(); + //Make sure that the LOOT game path exists. + try { + if (fs::exists(g_path_local) && !fs::exists(g_path_local / FolderName())) + fs::create_directory(g_path_local / FolderName()); + } + catch (fs::filesystem_error& e) { + BOOST_LOG_TRIVIAL(error) << "Could not create LOOT folder for game. Details: " << e.what(); + throw error(error::path_write_fail, lc::translate("Could not create LOOT folder for game. Details:").str() + " " + e.what()); + } } LoadOrderHandler::Init(*this, gameLocalAppData); @@ -188,18 +196,6 @@ namespace loot { return false; } - void Game::CreateLOOTGameFolder() { - //Make sure that the LOOT game path exists. - try { - if (fs::exists(g_path_local) && !fs::exists(g_path_local / FolderName())) - fs::create_directory(g_path_local / FolderName()); - } - catch (fs::filesystem_error& e) { - BOOST_LOG_TRIVIAL(error) << "Could not create LOOT folder for game. Details: " << e.what(); - throw error(error::path_write_fail, lc::translate("Could not create LOOT folder for game. Details:").str() + " " + e.what()); - } - } - std::list ToGames(const std::list& settings) { return list(settings.begin(), settings.end()); } diff --git a/src/backend/game/game.h b/src/backend/game/game.h index 470f7cab..d2cd6bf5 100644 --- a/src/backend/game/game.h +++ b/src/backend/game/game.h @@ -68,9 +68,6 @@ namespace loot { Masterlist masterlist; MetadataList userlist; std::unordered_map plugins; //Map so that plugin data can be edited. - private: - //Creates directory in LOOT folder for LOOT's game-specific files. - void CreateLOOTGameFolder(); }; std::list ToGames(const std::list& settings);