You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
It would be more appropriate to store state in ~/.local/state than ~/.config #18
Agreed, thanks! About the suggestion: what's the distinction between ~/.local/state and ~/.local/share ?
I'm looking at the dirs documentation for state_dir and see it only mentions a path for Linux. Is there a default for other operating systems, or will I need to handle them specifically, maybe with a switch case?
Activity
bentorkington commentedon Feb 14, 2025
in
dirslingo, this isstate_dir: (https://docs.rs/dirs/5.0.1/dirs/fn.state_dir.html)janTatesa commentedon Feb 26, 2025
Agree
GabAlpha commentedon Mar 16, 2025
Agreed, thanks! About the suggestion: what's the distinction between
~/.local/stateand~/.local/share?I'm looking at the
dirsdocumentation forstate_dirand see it only mentions a path for Linux. Is there a default for other operating systems, or will I need to handle them specifically, maybe with a switch case?bentorkington commentedon Mar 16, 2025
This page might help: https://wiki.gentoo.org/wiki/XDG/Base_Directories
Indeed,
~/.local/sharemay be a better choice than~/.local/state.I suspect the
dirsdocumentation is simply incomplete regarding paths, and as long as you're using thedirsmodule correctly it'll get it right.GabAlpha commentedon Mar 16, 2025
Great, I'll try to do some tests