Keep a non-root user's database in the XDG state directory (closes #171)
check / check (push) Waiting to run

Without SFDUPES_DATABASE, a user other than root now uses
sfdupes/db.sqlite in the XDG state directory (~/.local/state by
default) instead of failing on /var/lib/sfdupes. scan creates the
missing directories there with mode 0700, as the XDG Base Directory
specification asks. An XDG_STATE_HOME that is not an absolute path is
a fatal error for every subcommand. Root keeps
/var/lib/sfdupes/db.sqlite. The help of sfdupes and of scan, and
README, say where the database is. Adds github.com/adrg/xdg, the
decided XDG library.

Model: opus-5-5
This commit is contained in:
sneak authored and clawbot committed 2026-11-11 08:38:23 +00:00
1 parent 37893d2d5a
commit 049a74a10b
8 files changed
+289 -52

No files matched your search

+1
View File
@@ -3,6 +3,7 @@ module sneak.berlin/go/sfdupes
go 1.25.7
require (
github.com/adrg/xdg v0.5.3
github.com/rivo/uniseg v0.4.7
github.com/schollz/progressbar/v3 v3.19.1
github.com/spf13/cobra v1.10.2