mirror of
https://github.com/restic/restic.git
synced 2026-06-07 17:39:44 +00:00
cache: correctly ignore files whose filename is no ID
this can for example be the case for temporary files created by the backend implementation.
This commit is contained in:
Vendored
+2
-3
@@ -231,9 +231,8 @@ func (b *Backend) List(ctx context.Context, t backend.FileType, fn func(f backen
|
||||
wrapFn := func(f backend.FileInfo) error {
|
||||
id, err := restic.ParseID(f.Name)
|
||||
if err != nil {
|
||||
// returning error here since, if we cannot parse the ID, the file
|
||||
// is invalid and the list must exit.
|
||||
return err
|
||||
// ignore files with invalid name
|
||||
return nil
|
||||
}
|
||||
|
||||
ids.Insert(id)
|
||||
|
||||
Reference in New Issue
Block a user