mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
cache: Don't return an error for truncated files
Closes #1229 Closes #1328
This commit is contained in:
parent
6dc7cca597
commit
00597284de
3
internal/cache/file.go
vendored
3
internal/cache/file.go
vendored
@ -127,7 +127,8 @@ func (c *Cache) Save(h restic.Handle, rd io.Reader) error {
|
|||||||
if n <= crypto.Extension {
|
if n <= crypto.Extension {
|
||||||
_ = f.Close()
|
_ = f.Close()
|
||||||
_ = c.Remove(h)
|
_ = c.Remove(h)
|
||||||
return errors.Errorf("trying to cache truncated file %v", h)
|
debug.Log("trying to cache truncated file %v, removing", h)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = f.Close(); err != nil {
|
if err = f.Close(); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user