2
2
mirror of https://github.com/octoleo/restic.git synced 2024-05-30 15:40:50 +00:00

cache: Add file name to error message

This commit is contained in:
Alexander Neumann 2017-10-05 19:30:56 +02:00
parent 1dcfd64028
commit d81adcfaa5

View File

@ -60,7 +60,7 @@ func (c *Cache) Load(h restic.Handle, length int, offset int64) (io.ReadCloser,
if fi.Size() <= crypto.Extension {
_ = f.Close()
_ = c.Remove(h)
return nil, errors.New("cached file is truncated, removing")
return nil, errors.Errorf("cached file %v is truncated, removing", h)
}
if offset > 0 {