antfs-cli
antfs-cli copied to clipboard
Download files to $XDG_DATA_HOME, not $XDG_CONFIG_HOME
As per the XDG Base Directory specification, the data files downloaded from a device should be stored below $XDG_DATA_HOME (i.e. ~/.local/share) rather than below $XDG_CONFIG_HOME (~/.config).
The idea behind the specification is that someone could rm -rf ~/.config and still have a working system (albeit using the default configuration rather than any user-specific tweaks), but without losing any of their data. Running logs would count as user data.
Actually, it’s a bit more nuanced than this. The scripts and logs directories, and the downloaded .fit files, should be below $XDG_DATA_HOME. The per-device profile_version and authfile should potentially be below $XDG_CONFIG_HOME, but that’s more arguable either way.
Yeah, I agree, perhaps the scripts should be under the config section as well? I'd happily accept a pull request for this since it probably will be a while until I can look at it.
Yeah, I agree, perhaps the
scriptsshould be under the config section as well?
I think they should be under $XDG_DATA_HOME (i.e. ~/.local/share), since they could be user-written, and are code rather than configuration. Theoretically they should be under ~/.local/lib/antfs-cli, but there is no $XDG_LIB_HOME variable in the specification, so $XDG_DATA_HOME will do.
I’ll try and put a pull request together at some point, but don’t block on me doing that if you get there first.