mirror of
https://github.com/restic/restic.git
synced 2024-12-22 07:43:03 +00:00
cache: fix confusing debug log
This commit is contained in:
parent
d407abb50f
commit
4266dca1b6
1 changed files with 3 additions and 1 deletions
4
internal/backend/cache/backend.go
vendored
4
internal/backend/cache/backend.go
vendored
|
@ -162,7 +162,9 @@ func (b *Backend) Load(ctx context.Context, h backend.Handle, length int, offset
|
|||
// try loading from cache without checking that the handle is actually cached
|
||||
inCache, err := b.loadFromCache(h, length, offset, consumer)
|
||||
if inCache {
|
||||
debug.Log("error loading %v from cache: %v", h, err)
|
||||
if err != nil {
|
||||
debug.Log("error loading %v from cache: %v", h, err)
|
||||
}
|
||||
// the caller must explicitly use cache.Forget() to remove the cache entry
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue