XDG is claimed to be used but doesn't follow the spec
Opened this issue · 3 comments
Comments in the code talk about XDG, and the default config path is said to be ~/.config/yesiscan/config.json
but that path is configured relative to os.UserHomeDir()
instead of following the XDG Base Directory Specification which would use the $XDG_CONFIG_HOME
if set, and has other rules for deriving the path.
Recommend we either load configuration using a library that implements the spec, or avoid the appearance of XDG. It's probably safe to use ~/.config/
but not to imply that it's following XDG when it's not. The specification relates to a whole big design of mutable and immutable filesystems that we shouldn't claim to support if we don't.
Agreed. We should start looking at the $XDG_ var.
Since we are moving to yesiscan-lite (MVP), probably this will not needed. The idea is to use a monolithic scanner, that will pull the configs from a centralized place, personal configs will be optional but we would discuss about moving this feature to a P2 version.
Agreed. We should start looking at the $XDG_ var.
It's likely safer to use a library that already has the XDG spec implemented fully. It's not as simple as respecting one environment variable.