mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
mingw: use $APPDATA as a possible root for cachedir.
* libguile/load.c (scm_init_load_path) [MINGW32]: Fall back to using $LOCALAPPDATA or $APPDATA if $XDG_CACHE_HOME and $HOME aren't set.
This commit is contained in:
parent
a67f2fce54
commit
284019a2a5
1 changed files with 6 additions and 0 deletions
|
@ -293,6 +293,12 @@ scm_init_load_path ()
|
||||||
snprintf (cachedir, sizeof(cachedir), "%s/.cache/" FALLBACK_DIR,
|
snprintf (cachedir, sizeof(cachedir), "%s/.cache/" FALLBACK_DIR,
|
||||||
pwd->pw_dir);
|
pwd->pw_dir);
|
||||||
#endif /* HAVE_GETPWENT */
|
#endif /* HAVE_GETPWENT */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
else if ((e = getenv ("LOCALAPPDATA")))
|
||||||
|
snprintf (cachedir, sizeof (cachedir), "%s/.cache/" FALLBACK_DIR, e);
|
||||||
|
else if ((e = getenv ("APPDATA")))
|
||||||
|
snprintf (cachedir, sizeof (cachedir), "%s/.cache/" FALLBACK_DIR, e);
|
||||||
|
#endif /* __MINGW32__ */
|
||||||
else
|
else
|
||||||
cachedir[0] = 0;
|
cachedir[0] = 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue