mirror of
https://github.com/restic/restic.git
synced 2024-12-23 08:16:36 +00:00
backend: Improve ReadAt
This commit is contained in:
parent
240c4cf2fd
commit
176bfa6529
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/restic/restic/internal/debug"
|
"github.com/restic/restic/internal/debug"
|
||||||
|
"github.com/restic/restic/internal/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
type backendReaderAt struct {
|
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)
|
debug.Log("ReadAt(%v) ReadFull returned %v bytes", h, n)
|
||||||
|
|
||||||
return n, err
|
return n, errors.Wrapf(err, "ReadFull(%v)", h)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue