Well, they are supposed to be all in .config, problem is many app developers think they are special little boys that deserve its own directory
Well, they are supposed to be all in .config, problem is many app developers think they are special little boys that deserve its own directory
%LOCALAPPDATA% on Windows. Or better still, use GetAppContainerFolderPath or SHGetKnownFolderPath with FOLDERID_LocalAppData.
I don't know if anyone is actually using roaming profiles, but config should go into the %APPDATA% folder to support that. %LOCALAPPDATA% is for things that shouldn't be synced to different machines, such as caches.
I know we used to use them in our corporate environment. Not sure if we still do, or if they gave up and called OneDrive “good enough”.
It all sounds so easy, until you learn about the XDG Base Directory Specification[1]. You're actually supposed to do a whole song and dance around a hierarchical set of environment variables, associated defaults, and resolution orders.
Interfacing with people is never easy.
[1]: https://specifications.freedesktop.org/basedir/latest/
No. Actually, it's easy. Just check for directory or use a fallback. For example here's how you'd do this in bash:
XDG_*_DIRS are a bit more complicated, but nothing that can't be solved with a simple for-loop in any modern programming language.