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

use XDG_STATE_HOME as data_local_dir #48

Open
chayleaf opened this issue Apr 8, 2023 · 2 comments
Open

use XDG_STATE_HOME as data_local_dir #48

chayleaf opened this issue Apr 8, 2023 · 2 comments

Comments

@chayleaf
Copy link

chayleaf commented Apr 8, 2023

The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME.

To me, this seems to indicate that non-portable files should be stored here. Of course, changing this would be a breaking change.

@soc
Copy link
Collaborator

soc commented Apr 8, 2023

I think this would be rather surprising for users – which issue would such a behavior address?

@chayleaf
Copy link
Author

chayleaf commented Apr 21, 2023

XDG_DATA_HOME is often synced between machines by the user. XDG_STATE_HOME is not to be synced, as it's for local application state. When XDG_DATA_HOME is used, the expectation for data_local_dir's contents to not be synced is broken. Additionally, the "state_dir" that's only supported on Linux is a weird outlier (in that storing local state makes sense on Windows and Mac, unlike runtime_dir/executable_dir) and is as such unlikely to be used by devs for cross-platform apps. IMO it makes much more sense to merge state_dir and data_local_dir, since they both share roughly the same purpose (storing machine-specific files).

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

2 participants