game: fix the path the--portable flag determines (#3537)

`--portable` was using the path to the executable's file, instead of the
directory that contains the executable
This commit is contained in:
Tyler Wilding 2024-05-26 00:40:33 -04:00 committed by GitHub
parent 12ce274226
commit f6688659f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -142,7 +142,7 @@ int main(int argc, char** argv) {
// or because it's portable mode)
if (enable_portable) {
lg::info("Portable mod enabled");
user_config_dir_override = file_util::get_current_executable_path();
user_config_dir_override = fs::path(file_util::get_current_executable_path()).parent_path();
}
if (!user_config_dir_override.empty()) {
lg::info("Overriding config directory with: {}", user_config_dir_override.string());