Skip to content

State files stored in $XDG_DATA_HOME as dot files #369

@jmr

Description

@jmr

58588e7 (Support XDG Desktop Specification for config files) added support for XDG dirs, including storing files like .wget-hsts in $XDG_DATA_HOME/wget (~/.local/share/wget).

Since then, version 0.8 of the XDG base dir spec added $XDG_STATE_HOME (~/.local/state), which seems more appropriate for writable files.

$XDG_DATA_HOME is analogous to /usr/share and $XDG_STATE_HOME to /var/lib/. https://wiki.archlinux.org/title/XDG_Base_Directory

In addition, the files are stored as hidden files, whereas a name like wget-hsts or just hsts (since it's already in a wget/ subdir) would be more standard.

Would you take a patch along these lines, using the old locations if they exist, but writing to the new ones described above if they don't?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions