Stop counting directories and unchanged symlinks as files to back up (closes #305)
check / check (push) Waiting to run
check / check (push) Waiting to run
Every backup queued every directory and symlink for the second phase. The line ending the walk counted directories, and their stat sizes, as files to back up while its enumerated count left them out, and a symlink was counted as backed up on every run, its target length as data. The walk now sets directories aside: they are recorded before the files are backed up and never counted as files or data, and the walk's progress estimate leaves out the directories the local index knows. A symlink is checked against its record like a regular file, its target included, so an unchanged one counts as unchanged. Judgement call: every directory is still written to the local index on every backup, as before; no report shows it. Model: opus-5-5
This commit was merged in pull request #383.
This commit is contained in:
@@ -78,8 +78,7 @@ func TestProgressPercentWithSecondPathSmaller(t *testing.T) {
|
||||
|
||||
stats := progress.GetStats()
|
||||
|
||||
// Directories count toward the total size but produce no chunks, so
|
||||
// the percentage ends just under 100%.
|
||||
// With both paths counted, the percentage must not exceed 100%.
|
||||
percent := float64(stats.BytesProcessed.Load()) /
|
||||
float64(stats.TotalSize.Load()) * 100
|
||||
if percent > 100 {
|
||||
|
||||
Reference in New Issue
Block a user