Skip removed paths silently and fix the progress line (closes #133)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
A path removed before the scan reaches it, in the walk or the hash phase, gets no warning, no skipped count and no record. If the first of several hard links is gone, the next is read. On a terminal every display is the library's spinner, then the line. A phase with an exact total ends the padded line with its percent and a bar at a fixed column. sfdupes draws that bar: the library shows no spinner beside its own. The time remaining is labelled remain, not eta. Judgement call: an operand removed after the scan starts is passed over silently too. Deviation: README's 80-column promise for stalled lines is narrowed to its example. Model: opus-5-5
This commit is contained in:
+2
-2
@@ -187,7 +187,7 @@ func TestReportStdoutFailsWhileReading(t *testing.T) {
|
||||
// reportOpenLine is the plain line of report's open phase when it opens
|
||||
// the database at once; it prints it as the phase starts and as it ends.
|
||||
const reportOpenLine = "[1/2] open: opening the database, elapsed 0s, " +
|
||||
"eta unknown"
|
||||
"remain unknown"
|
||||
|
||||
// smokeReport is report's stdout for the smoke-test records.
|
||||
const smokeReport = "first\tdupe\tsize\n" +
|
||||
@@ -225,7 +225,7 @@ func TestRunReportProgressNamesEachPhase(t *testing.T) {
|
||||
"report: database " + path + " (from " + databaseEnv + ")",
|
||||
reportOpenLine,
|
||||
reportOpenLine,
|
||||
"[2/2] read: counting the records, elapsed 0s, eta unknown",
|
||||
"[2/2] read: counting the records, elapsed 0s, remain unknown",
|
||||
"[2/2] read: [6/6] 100%, ",
|
||||
"report: 6 records read, 2 duplicate groups, 4 dupe files, " +
|
||||
"6.1 KiB reclaimable",
|
||||
|
||||
Reference in New Issue
Block a user