mirror of
https://github.com/restic/restic.git
synced 2025-08-12 17:37:40 +00:00
Close backend files in case of errors
This commit is contained in:
1
internal/cache/backend.go
vendored
1
internal/cache/backend.go
vendored
@@ -127,6 +127,7 @@ func (b *Backend) cacheFile(ctx context.Context, h restic.Handle) error {
|
||||
}
|
||||
|
||||
if err = b.Cache.Save(h, rd); err != nil {
|
||||
_ = rd.Close()
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user