Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

use XDG_STATE_HOME as data_local_dir #48

Open

Description

@chayleaf

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.

Activity

  1. soc commented on Apr 8, 2023

    @soc
    Collaborator

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

  2. chayleaf commented on Apr 21, 2023

    @chayleaf
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions