Update Linux config file folder location to follow XDG base directory specification
~/.volk is bad on Linux; we should be going for .config/volk for configuration; compare https://github.com/gnuradio/gnuradio/pull/7136
Thank you for the suggestion.
From the linked issue, I extracted that the relevant part would be the XDG_CONFIG_HOME part where the kernel config should be located.
In this new configuration, gr::paths::userconf() (and the legacy, gr::userconf_path()) tries to find the user configuration in the following order:
- $GR_PREFS_PATH if that environment variable is set
- $XDG_CONFIG_HOME/gnuradio; if $XDG_CONFIG_HOME is set, and $XDG_CONFIG_HOME/gnuradio exists and is a directory
- appdata()/.config/gnuradio (appdata ~= $HOME) if that exists and is a directory
- appdata()/.gnuradio if that exists and is a directory
- $XDG_CONFIG_HOME/gnuradio if $XDG_CONFIG_HOME is set
- appdata()/.config/gnuradio
So, in other words: unless explicitly set to something else, try the new XDG_CONFIG_HOME path, if that doesn't exist, try the old path, and if neither exists, use the new one.
Alternatively, we need to consider the XDG_CACHE_HOME option because it resembles the FFTW wisdom use case.