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--;
|
while (p >= pathToModule && *p != '\\') p--;
|
||||||
if (++p >= pathToModule) *p = 0;
|
if (++p >= pathToModule) *p = 0;
|
||||||
#else
|
#else
|
||||||
// strcpy(pathToModule, g_get_home_dir());
|
char *cwd = g_get_current_dir();
|
||||||
const char *homedir = getenv ("HOME");
|
strncpy(pathToModule, cwd, MAX_PATH);
|
||||||
strcpy(pathToModule, homedir);
|
g_free(cwd);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue