Look for modules in cwd instead of home
gmelquio suggests in bug #2862128 we should use cwd and not force the home directory where looking for modules like savefiles. Applied a modified patch which uses glib and does not leak the string.
This commit is contained in:
parent
8b7a7f9b50
commit
47910a5264
|
@ -84,9 +84,9 @@ public:
|
|||
while (p >= pathToModule && *p != '\\') p--;
|
||||
if (++p >= pathToModule) *p = 0;
|
||||
#else
|
||||
// strcpy(pathToModule, g_get_home_dir());
|
||||
const char *homedir = getenv ("HOME");
|
||||
strcpy(pathToModule, homedir);
|
||||
char *cwd = g_get_current_dir();
|
||||
strncpy(pathToModule, cwd, MAX_PATH);
|
||||
g_free(cwd);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue