use addGameInstallDir here (#1354)

This commit is contained in:
ElBread3 2024-10-12 09:53:47 -05:00 committed by GitHub
parent 7c00ac637a
commit 97b5289f15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -538,12 +538,12 @@ void load(const std::filesystem::path& path) {
// TODO Migration code, after a major release this should be removed. // TODO Migration code, after a major release this should be removed.
auto old_game_install_dir = toml::find_fs_path_or(gui, "installDir", {}); auto old_game_install_dir = toml::find_fs_path_or(gui, "installDir", {});
if (!old_game_install_dir.empty()) { if (!old_game_install_dir.empty()) {
settings_install_dirs.emplace_back(std::filesystem::path{old_game_install_dir}); addGameInstallDir(std::filesystem::path{old_game_install_dir});
} else { } else {
const auto install_dir_array = const auto install_dir_array =
toml::find_or<std::vector<std::string>>(gui, "installDirs", {}); toml::find_or<std::vector<std::string>>(gui, "installDirs", {});
for (const auto& dir : install_dir_array) { for (const auto& dir : install_dir_array) {
settings_install_dirs.emplace_back(std::filesystem::path{dir}); addGameInstallDir(std::filesystem::path{dir});
} }
} }