mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-22 23:18:01 +03:00
Always use absolute path for config.home_dir
And by extension config.save_dir. This fixes an issue where paths retrieved by system.GetSaveFolderName and then passed to gamedir_path would become invalid. Fixes #115
This commit is contained in:
+2
-2
@@ -224,7 +224,7 @@ static char *get_xsystem4_home(void)
|
||||
}
|
||||
|
||||
// If all else fails, use the current directory
|
||||
return xstrdup(".");
|
||||
return realpath_utf8(".");
|
||||
}
|
||||
|
||||
static char *get_save_path(const char *dir_name)
|
||||
@@ -491,7 +491,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (argc < 1) {
|
||||
if (!config_init_with_dir(".")) {
|
||||
if (!config_init_with_dir("../"))
|
||||
if (!config_init_with_dir(".."))
|
||||
usage_error("Failed to find game in current or parent directory");
|
||||
}
|
||||
} else if (argc > 1) {
|
||||
|
||||
+1
-1
Submodule subprojects/libsys4 updated: 05b4cec8a6...29d73563ec
Reference in New Issue
Block a user