GIMP creates fontconfig cache in installation directory or other unusual (writable) dir
GIMP version: GIMP 2.10.8
Operating System: Windows 10
Package: Installer from gimp.org
Description of the bug
I have GIMP installed on an additional hard drive (so not in Program Files) and at some point it stopped using %LOCALAPPDATA%/fontconfig for the fontconfig cache. Instead it started using $GIMPINSTALLDIR/var/cache/fontconfig.
I just installed GIMP to Program Files to check which path it is actually supposed to use now and it seems like %USERPROFILE%/.cache/fontconfig is the new path where it is supposed to be.
Reproduction
Install GIMP in any non write-protected folder. Start GIMP and let it generate the fontconfig cache. The cache is now located in $GIMPINSTALLDIR/var/cache/fontconfig instead of %USERPROFILE%/.cache/fontconfig.
Is the bug reproducible? Yes, always
Expected result: Fontconfig cache should always be created in the same place, no matter where GIMP was installed
Actual result: Fontconfig cache location varies depending on the user's access rights to the GIMP's installation directory.