Say "skipped" in scan's warnings for skipped paths (closes #170)
check / check (push) Waiting to run

A warning for a path the summary counts as skipped now reads
`scan: skipped PATH (REASON)`, naming the path once. This covers
unreadable directories, failed lstats, failed reads and dropped
operands. Each path of a hard-linked file that cannot be read gets its
own line, since each is counted. Lines for paths left out on purpose
(`--exclude`, default excludes, filesystems that are not persistent)
now read `scan: left out PATH (...)`, so a search for `scan: skipped`
finds only the counted paths.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-11 12:08:27 +00:00
1 parent 317abb834c
commit 4dba676880
7 files changed
+97 -48

No files matched your search

+15 -3
View File
@@ -563,7 +563,7 @@ walk practical on large or busy storage pools.
`scan` prints a line on stderr naming the path and its filesystem type:
```
scan: skipped /dev/shm (tmpfs, not a persistent filesystem)
scan: left out /dev/shm (tmpfs, not a persistent filesystem)
```
The path is not counted as skipped. The records below it are kept, as
@@ -573,7 +573,7 @@ walk practical on large or busy storage pools.
For each one it reaches, `scan` prints a line on stderr naming it:
```
scan: skipped /srv/cache (--exclude)
scan: left out /srv/cache (--exclude)
```
The path is not counted as skipped. The scan keeps the records at and below
@@ -622,7 +622,7 @@ walk practical on large or busy storage pools.
not enter, `scan` prints a line on stderr naming it:
```
scan: skipped /var/tmp (default exclude)
scan: left out /var/tmp (default exclude)
```
The directory is not counted as skipped. `scan` prints the filesystem line
@@ -682,6 +682,18 @@ scan: 123400 files seen (1200 added, 34 updated, 56 removed, 122166 unchanged),
`removed` counts deleted records, which are not part of the files seen.
The warning for a skipped path names the path once and gives the reason:
```
scan: skipped /srv/a/closed (permission denied)
scan: skipped /srv/a/pipe (a FIFO)
```
The summary counts each path named in such a warning. A line for a path left out
on purpose starts with `scan: left out` instead, and is not counted. A search of
the log for `scan: skipped` therefore finds the paths the summary counts. When a
file with several hard links cannot be read, each of its paths gets a warning.
#### Stopping a scan
`scan` stops cleanly on `SIGINT`, the signal Ctrl-C sends, or `SIGTERM`, the