forked from TrueCloudLab/restic
Merge pull request 2099 from restic/fix-1229
cache: Don't return an error for truncated files
This commit is contained in:
commit
0083680d33
1 changed files with 2 additions and 1 deletions
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 {
|
||||
_ = f.Close()
|
||||
_ = 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 {
|
||||
|
|
Loading…
Reference in a new issue