When the database lay under a scanned operand, the walk recorded the database file, its -wal and -shm files and its .lock file like any other file: every rescan updated them, and report paired them with the tree's empty files.
What changed:
databaseFiles in db.go notes the device and inode of those four files, named from the database's path with symlinks resolved, as SQLite and the lock already name them. runScan calls it once the database and the lock file are open, when all four exist.
In scan.go, emitFile (a file below an operand) and seedRoot (a regular-file operand) pass over a file with one of those identities: no event, so no line, no count and no record. A record an earlier scan left for one of them is deleted as unverified.
README "Rules for the walk" states the rule; the smoke-test note on keeping the database out of the tree is gone.
What the diff does not show:
Matching is by device and inode, not path, so an operand reached through a symlinked directory still matches.
No -journal file is noted: the database is in WAL mode for the whole walk.
The -wal and -shm files keep their inode through the walk, because the scan's one connection stays open and nothing is written before the hash phase.
Judgement call: walkRules, in exclude.go, carries the noted files to the walk, since it already reaches every walk function.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/sfdupes/issues/115.
When the database lay under a scanned operand, the walk recorded the database file, its `-wal` and `-shm` files and its `.lock` file like any other file: every rescan updated them, and `report` paired them with the tree's empty files.
What changed:
- `databaseFiles` in `db.go` notes the device and inode of those four files, named from the database's path with symlinks resolved, as SQLite and the lock already name them. `runScan` calls it once the database and the lock file are open, when all four exist.
- In `scan.go`, `emitFile` (a file below an operand) and `seedRoot` (a regular-file operand) pass over a file with one of those identities: no event, so no line, no count and no record. A record an earlier scan left for one of them is deleted as unverified.
- README "Rules for the walk" states the rule; the smoke-test note on keeping the database out of the tree is gone.
What the diff does not show:
- Matching is by device and inode, not path, so an operand reached through a symlinked directory still matches.
- No `-journal` file is noted: the database is in WAL mode for the whole walk.
- The `-wal` and `-shm` files keep their inode through the walk, because the scan's one connection stays open and nothing is written before the hash phase.
Judgement call: `walkRules`, in `exclude.go`, carries the noted files to the walk, since it already reaches every walk function.
Model: opus-5-5
When the database lay under a scanned operand, the walk recorded the
database file, its -wal and -shm files and its .lock file like any other
file, so every rescan updated them and report paired them with empty
files. Once the database and the lock file are open, the scan now notes
their device and inode, and the walk passes over a file with one of
them, as an operand or below one, printing no line and counting
nothing. Matching by device and inode holds through a symlinked
directory, where comparing paths would not. A record an earlier scan
left for one of them is deleted as unverified. README's smoke-test note
on keeping the database out of the tree is gone, as it no longer holds.
Judgement call: walkRules, in exclude.go, carries the noted files to the walk.
Model: opus-5-5
Review passed: #128 meets the definition of done of #115.
Model: opus-5-5
Review passed: https://git.eeqj.de/sneak/sfdupes/pulls/128 meets the definition of done of https://git.eeqj.de/sneak/sfdupes/issues/115.
Model: opus-5-5
clawbot
merged commit dcfe0ea080 into next2026-10-17 04:10:51 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #115.
When the database lay under a scanned operand, the walk recorded the database file, its
-waland-shmfiles and its.lockfile like any other file: every rescan updated them, andreportpaired them with the tree's empty files.What changed:
databaseFilesindb.gonotes the device and inode of those four files, named from the database's path with symlinks resolved, as SQLite and the lock already name them.runScancalls it once the database and the lock file are open, when all four exist.scan.go,emitFile(a file below an operand) andseedRoot(a regular-file operand) pass over a file with one of those identities: no event, so no line, no count and no record. A record an earlier scan left for one of them is deleted as unverified.What the diff does not show:
-journalfile is noted: the database is in WAL mode for the whole walk.-waland-shmfiles keep their inode through the walk, because the scan's one connection stays open and nothing is written before the hash phase.Judgement call:
walkRules, inexclude.go, carries the noted files to the walk, since it already reaches every walk function.Model: opus-5-5
Review passed: #128 meets the definition of done of #115.
Model: opus-5-5