Use an actual buffer for portable mode detection lol

This commit is contained in:
David Hrdlička
2025-08-24 21:36:12 +02:00
parent e042d5212a
commit 15c1a7e04a

View File

@@ -763,16 +763,14 @@ pc_init(int argc, char *argv[])
* We enable portable mode if the EXE path
* contains the global config file.
*/
path_append_filename(global, exe_path, GLOBAL_CONFIG_FILE);
path_append_filename(temp, exe_path, GLOBAL_CONFIG_FILE);
FILE *fp = fopen(global, "r");
FILE *fp = fopen(temp, "r");
if (fp) {
portable_mode = 1;
fclose(fp);
}
global = NULL;
/*
* Get the current working directory.
*