You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you run mcaselector on a linux system that has flatpak installed the log files will end up in ~/.local/share/flatpak/exports/share/mcaselector (or equivalent if XDG_DATA_HOME is set). This happens because mcaselector incorretly writes to the first directory set in XDG_DATA_DIRS if XDG_DATA_HOME isn't set.
To Reproduce
Steps to reproduce the behavior:
Install flatpak on any linux distro that implements XDG Base Directory
Set up mcaselector
mcaselector log files will end up in the wrong place
Expected behavior
If XDG_DATA_HOME isnt set mcaselector should fall back to ~/.local/share/mcaselector as that is the fallback specified in the spec (same goes for XDG_CONFIG_DIRS and its default ~/.config).
As per the XDG Base Directory spec XDG_DATA_DIRS and XDG_CONFIG_DIRS should only be searched for pre-existing data and config files new files shouldnt be written to any of the set directories. See the 6th and 7th points in the bullet point list in the spec under Basics. This is why most distros will not set most of the XDG Base Directory env variables because they explicitly fall back to their respective default paths and not XDG_DATA_DIRS or XDG_CONFIG_DIRS.
Additionally as of version 0.8 of the XDG Base Directory spec log files should be put in XDG_STATE_HOME (defaulting to ~/.local/state) instead of XDG_DATA_HOME. See the relevant section of the Environment Variables section of the spec
Environment (please complete the following information):
OS: Linux (Fedora linux in my case but any modern distribution will have the same issue)
Describe the bug
If you run mcaselector on a linux system that has flatpak installed the log files will end up in
~/.local/share/flatpak/exports/share/mcaselector
(or equivalent ifXDG_DATA_HOME
is set). This happens because mcaselector incorretly writes to the first directory set inXDG_DATA_DIRS
ifXDG_DATA_HOME
isn't set.To Reproduce
Steps to reproduce the behavior:
Expected behavior
If
XDG_DATA_HOME
isnt set mcaselector should fall back to~/.local/share/mcaselector
as that is the fallback specified in the spec (same goes forXDG_CONFIG_DIRS
and its default~/.config
).As per the XDG Base Directory spec
XDG_DATA_DIRS
andXDG_CONFIG_DIRS
should only be searched for pre-existing data and config files new files shouldnt be written to any of the set directories. See the 6th and 7th points in the bullet point list in the spec under Basics. This is why most distros will not set most of the XDG Base Directory env variables because they explicitly fall back to their respective default paths and notXDG_DATA_DIRS
orXDG_CONFIG_DIRS
.Additionally as of version 0.8 of the XDG Base Directory spec log files should be put in
XDG_STATE_HOME
(defaulting to~/.local/state
) instead ofXDG_DATA_HOME
. See the relevant section of the Environment Variables section of the specEnvironment (please complete the following information):
The text was updated successfully, but these errors were encountered: