mirror of
https://github.com/restic/restic.git
synced 2026-11-21 13:02:42 +00:00
Close backend files in case of errors
This commit is contained in:
1 parent
d62a664bb7
commit
909d9273cc
3 files changed
+4
No files matched your search
Vendored
+1
@@ -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