Remove duplicate fs calls

This commit is contained in:
wheremyfoodat 2024-12-26 23:03:17 +02:00 committed by GitHub
parent d24b780b7a
commit 6a41065499
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,8 +105,10 @@ std::filesystem::path Emulator::getConfigPath() {
if constexpr (Helpers::isAndroid()) {
return getAndroidAppPath() / "config.toml";
} else {
if (std::filesystem::exists(std::filesystem::current_path() / "config.toml")) {
return std::filesystem::current_path() / "config.toml";
std::filesystem::path localPath = std::filesystem::current_path() / "config.toml");
if (std::filesystem::exists(localPath)) {
return localPath;
} else {
return getAppDataRoot() / "config.toml";
}
@ -472,4 +474,4 @@ void Emulator::reloadSettings() {
}
}
#endif
}
}