From 176bfa65293859fb27581a3a75d8cdadd45758be Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 24 Sep 2017 23:10:26 +0200 Subject: [PATCH] backend: Improve ReadAt --- internal/restic/readerat.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/restic/readerat.go b/internal/restic/readerat.go index 7b5a01fa6..b03fa4687 100644 --- a/internal/restic/readerat.go +++ b/internal/restic/readerat.go @@ -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) }