mirror of
https://github.com/restic/restic.git
synced 2025-08-21 23:17:26 +00:00
backup: hide files from status which are read completely but not saved
As the FileSaver is asynchronously waiting for all blobs of a file to be stored, the number of active files is higher than the number of files from which restic is reading concurrently. Thus to not confuse users, only display files in the status from which restic is currently reading.
This commit is contained in:
@@ -60,6 +60,7 @@ func TestFileSaver(t *testing.T) {
|
||||
defer cleanup()
|
||||
|
||||
startFn := func() {}
|
||||
completeReadingFn := func() {}
|
||||
completeFn := func(*restic.Node, ItemStats) {}
|
||||
|
||||
testFs := fs.Local{}
|
||||
@@ -78,7 +79,7 @@ func TestFileSaver(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
ff := s.Save(ctx, filename, filename, f, fi, startFn, completeFn)
|
||||
ff := s.Save(ctx, filename, filename, f, fi, startFn, completeReadingFn, completeFn)
|
||||
results = append(results, ff)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user