Junction icon indicating copy to clipboard operation
Junction copied to clipboard

Clean up `$XDG_DATA_DIRS` and adhere to the XDG Base Directory Specification

Open antecrescent opened this issue 1 year ago • 0 comments

The first commit fixes a startup error (#115), when $XDG_DATA_DIRS is not defined and thus gets incorrectly set to :/run/host/usr/share:/var/lib/snapd/desktop:/var/lib/flatpak/exports/share:${HOME}/.local/share/flatpak/exports/share while the XDG Base Directory Specification states:

If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used.

The second commit removes entries from $XDG_DATA_DIRS that Snapd and Flatpak set themselves already.

I found a downstream incident report, where Junction "doesn't work with programs that do their own weird stuff and end up clearing the env". I didn't investigate this further, since I believe that this was either a user error or the programs in question need to properly handle $XDG* variables. I mentioned it in case it's relevant to this PR.

antecrescent avatar Apr 29 '24 09:04 antecrescent