RCF: Basedir specification for non-Linux
piegames
piegames at darmstadt.ccc.de
Mon Apr 26 21:46:46 UTC 2021
Hi,
in discussions around applications adopting the basedir specification,
the handling of non-Linux systems (especially Windows and MacOS) is
something that really comes up a lot.
*Technically*, the specification is platform-independent, as it only
depends on the concept of environment variables. However, this is not
an accepted solution, as it is not native to these respective
platforms. Instead, a common solution is to use the specification only
on Linux and the respective native equivalents on other platforms.
Thus, I have the following idea: if we set the default value for
$XDG_DATA_HOME, $XDG_CACHE_HOME and $XDG_CONFIG_HOME to the respective
native equivalents for non-Linux platforms, it would make things easier
to adopt on the application side. I am not sure if this is a breaking
change, as the specification is not really explicit whether it even
applies to other platforms at the moment.
A disadvantage is that – at least on Windows – the destination paths
are not computable anymore, and the Known Folders API needs to be
called in order to get the values.
Let me know what you think about this,
piegames
More information about the xdg
mailing list