Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: special locations ignore XDG environment variables #1184

Open
umlaeute opened this issue Jan 6, 2023 · 0 comments
Open

[Bug]: special locations ignore XDG environment variables #1184

umlaeute opened this issue Jan 6, 2023 · 0 comments

Comments

@umlaeute
Copy link

umlaeute commented Jan 6, 2023

Detailed steps on how to reproduce the bug

  • configure JUCE to build the extras
  • build JUCE with extras
  • export the XDG_CONFIG_HOME envvar, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant