mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 21:05:10 +00:00
Properly wrap errors in readerat helper
This commit is contained in:
parent
75c990504d
commit
cf92c58460
@ -35,10 +35,9 @@ func ReadAt(ctx context.Context, be Backend, h Handle, offset int64, p []byte) (
|
|||||||
return ierr
|
return ierr
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, errors.Wrapf(err, "ReadFull(%v)", h)
|
||||||
}
|
}
|
||||||
|
|
||||||
debug.Log("ReadAt(%v) ReadFull returned %v bytes", h, n)
|
debug.Log("ReadAt(%v) ReadFull returned %v bytes", h, n)
|
||||||
|
return n, nil
|
||||||
return n, errors.Wrapf(err, "ReadFull(%v)", h)
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user