Skip to content

move default database path to `~/.local/share`

Roland Hieber requested to merge rohieb/feed2exec:for-master into master

According to the XDG Base Directory Specification, $XDG_CACHE_HOME is meant to contain "user-specific non-essential (cached) data", and as such that location is often not contained in backups. However, the database also implicitly contains the fetch state of each feed item, so when it is deleted or gets lost, all feed items are fetched again. This might not be the intention of the user, and could lead to manual deduplication work (e.g. for the maildir output plugin when the maildir was restored from the backup) or confusion (e.g. when announcing new feed items on social networks with the exec plugin). One could prevent this behaviour by calling feed2exec with the --catchup argument, at the cost of missing any new feed items.

It is therefore understandable to want to backup the database too. In order to make this easier, move its default location to $XDG_DATA_HOME (defaulting to ~/.local/share), which is meant for "user-specific data files", and does not carry the notion of redundant data. However, try the old path in $XDG_CACHE_HOME first for backwards compatibility.

Closes: #16 (closed)

Merge request reports