mirror of
https://github.com/octoleo/restic.git
synced 2024-11-02 19:49:44 +00:00
repository: Use ReadAt() instead of Load()
This commit is contained in:
parent
e8fcc7e74c
commit
f382696ccf
@ -97,7 +97,8 @@ func (r *Repository) loadBlob(id restic.ID, t restic.BlobType, plaintextBuf []by
|
|||||||
// load blob from pack
|
// load blob from pack
|
||||||
h := restic.Handle{Type: restic.DataFile, Name: blob.PackID.String()}
|
h := restic.Handle{Type: restic.DataFile, Name: blob.PackID.String()}
|
||||||
plaintextBuf = plaintextBuf[:cap(plaintextBuf)]
|
plaintextBuf = plaintextBuf[:cap(plaintextBuf)]
|
||||||
n, err := r.be.Load(h, plaintextBuf, int64(blob.Offset))
|
|
||||||
|
n, err := restic.ReadAt(r.be, h, int64(blob.Offset), plaintextBuf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
debug.Log("error loading blob %v: %v", blob, err)
|
debug.Log("error loading blob %v: %v", blob, err)
|
||||||
lastError = err
|
lastError = err
|
||||||
|
Loading…
Reference in New Issue
Block a user