Skip to content

Linux: follow XDG spec for directories#697

Open
whizikxd wants to merge 1 commit intoEpicGamesExt:devfrom
whizikxd:fix_linux_data_dir
Open

Linux: follow XDG spec for directories#697
whizikxd wants to merge 1 commit intoEpicGamesExt:devfrom
whizikxd:fix_linux_data_dir

Conversation

@whizikxd
Copy link

@whizikxd whizikxd commented Dec 5, 2025

If $XDG_DATA_HOME is not set or empty, default to $HOME/.local/share, as specified in
https://specifications.freedesktop.org/basedir/latest/#variables

Related/fixes: #660

@mmozeiko
Copy link
Collaborator

mmozeiko commented Dec 5, 2025

IMHO in raddbg case these files should be split between $XDG_CONFIG_HOME (config files) and $XDG_STATE_HOME (logs/temporary files). And not use XDG_DATA_HOME at all.

In case splitting is too much, I'd prefer to use only $XDG_CONFIG_HOME instead. And fallback to ~/.config obviously.

@whizikxd
Copy link
Author

whizikxd commented Dec 5, 2025

On second thought I do agree XDG_DATA_HOME is kind of a weird place to put all the files in case of raddbg. I can either change it to XDG_CONFIG_HOME (for now atleast) or attempt to split it between the two directories which would be more involved from what i can tell.

@whizikxd whizikxd force-pushed the fix_linux_data_dir branch 2 times, most recently from 699e544 to 6a56906 Compare December 12, 2025 14:02
@whizikxd
Copy link
Author

I've done the split - config files are now in $XDG_CONFIG_HOME or ~/.config and other files are in $XDG_STATE_HOME or ~/.local/state. Windows platform is unchanged.

@whizikxd whizikxd changed the title Linux: use XDG_DATA_HOME instead of HOME for user_program_data_path Linux: follow XDG spec for directories Dec 12, 2025
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

Successfully merging this pull request may close these issues.

2 participants