JUCE
JUCE copied to clipboard
[Bug]: special locations ignore XDG environment variables
trafficstars
Detailed steps on how to reproduce the bug
- configure JUCE to build the extras
- build JUCE with extras
- export the
XDG_CONFIG_HOMEenvvar, setting it to/tmp/ - run the
SystemInfoDemo:XDG_CONFIG_HOME=/tmp/ ./SystemInfoDemo_artefacts/SystemInfoDemo
notice that the SystemInfoDemo window says:
> User application data folder: /home/user/.config
### What is the expected behaviour?
i expect it to honour the `XDG_CONFIG_HOME` *envvar, so that SystemInfoDemo says:
> User application data folder: /tmp
note, that adding a line `XDG_CONFIG_HOME=/tmp` to the `~/.config/user-dirs.dirs` file works.
however, when i read the [specifications](https://specifications.freedesktop.org/basedir-spec/latest) i only see that the *environment variables* must be honoured.
i guess that falling back to values in `~/.config/user-dirs.dirs` is fine, as long as the environment variables take precedence.
it should be simple enough to first check the envvar whether it exists, before parsing the `user-dirs.dirs` file for a fallback.
### Operating systems
Linux
### What versions of the operating systems?
Debian/bookworm
### Architectures
x86_64
### Stacktrace
_No response_
### Plug-in formats (if applicable)
_No response_
### Plug-in host applications (DAWs) (if applicable)
_No response_
### Testing on the `develop` branch
I have not tested against the `develop` branch
### Code of Conduct
- [X] I agree to follow the Code of Conduct