mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +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,
|
||||
pwd->pw_dir);
|
||||
#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
|
||||
cachedir[0] = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue