Skip to content

state.json (and extensions dir) hardcoded under $XDG_CONFIG_HOME instead of $XDG_STATE_HOME #821

Description

@agraboso

What happened?

hunk stores its state file in $XDG_CONFIG_HOME/hunk/state.json right alongside its config file $XDG_CONFIG_HOME/hunk/config.toml.

Per the XDG Base Directory spec, $XDG_CONFIG_HOME is for user-editable configuration, while $XDG_STATE_HOME (defaulting to ~/.local/state) is for 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" — which, seems to me, describes state.json's contents exactly.

Steps to reproduce

Open $XDG_CONFIG_HOME/hunk and find state.json inside.

Expected behavior

state.jsonshould live in $XDG_STATE_HOME/hunk.

Version

0.19.0

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions