Re: [Gimp-user] GIMP SWAP Folder not honored



stormy wrote:
Also what is the proper default cache folder expected on Windows if
none
were explicitly set?

I guess this is OK:

c:\Users\myuser\AppData\Local\Microsoft\Windows\INetCache\gegl-0.4

Just to note that this would /not/ be a sensible default location for GIMP (or GEGL) to store its cache files. This is under a directory where Microsoft Windows stores /its/ own data. To be honest I'm not quite sure what INetCache is used for specifically. As far as I can make out from searching it's something to do with Internet Explorer's cache or perhaps running plugins in protected mode. Not sure why anything to do with GEGL would have ended up there though... is there a GIMP or GEGL browser plugin?

A more sensible default would be somewhere under, say:
  C:\Users\myuser\AppData\Local\GIMP\
i.e. a GIMP-specific directory under the local appdata directory. The local appdata directory is relocatable (as is the whole C:\Users directory), so the path used should be more like:
  %LOCALAPPDATA%\GIMP\
Where %LOCALAPPDATA% is an environment variable (set by Windows) containing the correct path to the current user's local appdata directory.

I believe there are also Windows API calls to retrieve the local appdata path. Looks like perhaps SHGetKnownFolderPath (since Windows Vista) or (deprecated) SHGetFolderPathA for compatibility with older versions:
<https://docs.microsoft.com/en-gb/windows/desktop/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath>
<https://docs.microsoft.com/en-gb/windows/desktop/api/shlobj_core/nf-shlobj_core-shgetfolderpatha>

If using %LOCALAPPDATA% or the API calls to get the local appdata path, it may not really be necessary to provide an option within GIMP to change those paths. Anyone wanting to move GIMP's appdata to a different disk should be able to just configure Windows to move the appdata directories, and as a bonus other applications (should) also store their data at the new location.

Note that there's also a "roaming" appdata path. That shouldn't be used for large amounts of data, particularly if temporary or disposable caches. On networks using roaming profiles, the roaming appdata directory is synchronised to a server during log-on/log-off, which gets slow if there's a lot of data there. It might be useful for configuration files though, since change made on one machine should then be carried over to other machines the user log on to (if roaming profiles are being used). Apologies for some vagueness; I've never actually had to be concerned with the details. Probably best look up authoritative info on Windows roaming profiles and correct usage of "local" vs "roaming" appdata directories if this is of concern.

--
Mark.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]