2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-16 07:42:22 +00:00

backend: Improve ReadAt

This commit is contained in:
Alexander Neumann 2017-09-24 23:10:26 +02:00
parent 240c4cf2fd
commit 176bfa6529

View File

@ -5,6 +5,7 @@ import (
"io"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
)
type backendReaderAt struct {
@ -37,5 +38,5 @@ func ReadAt(ctx context.Context, be Backend, h Handle, offset int64, p []byte) (
debug.Log("ReadAt(%v) ReadFull returned %v bytes", h, n)
return n, err
return n, errors.Wrapf(err, "ReadFull(%v)", h)
}