mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-14 03:07:08 +12:00
Remove duplicate fs calls
This commit is contained in:
parent
d24b780b7a
commit
6a41065499
1 changed files with 5 additions and 3 deletions
|
@ -105,8 +105,10 @@ std::filesystem::path Emulator::getConfigPath() {
|
||||||
if constexpr (Helpers::isAndroid()) {
|
if constexpr (Helpers::isAndroid()) {
|
||||||
return getAndroidAppPath() / "config.toml";
|
return getAndroidAppPath() / "config.toml";
|
||||||
} else {
|
} else {
|
||||||
if (std::filesystem::exists(std::filesystem::current_path() / "config.toml")) {
|
std::filesystem::path localPath = std::filesystem::current_path() / "config.toml");
|
||||||
return std::filesystem::current_path() / "config.toml";
|
|
||||||
|
if (std::filesystem::exists(localPath)) {
|
||||||
|
return localPath;
|
||||||
} else {
|
} else {
|
||||||
return getAppDataRoot() / "config.toml";
|
return getAppDataRoot() / "config.toml";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue