mirror of
https://github.com/restic/restic.git
synced 2025-08-25 19:29:36 +00:00
repository: fix parameter order of LookupBlobSize
All methods should use blobType followed by ID.
This commit is contained in:
@@ -429,7 +429,7 @@ func (c *Checker) checkTree(id restic.ID, tree *restic.Tree) (errs []error) {
|
||||
// unfortunately fails in some cases that are not resolvable
|
||||
// by users, so we omit this check, see #1887
|
||||
|
||||
_, found := c.repo.LookupBlobSize(blobID, restic.DataBlob)
|
||||
_, found := c.repo.LookupBlobSize(restic.DataBlob, blobID)
|
||||
if !found {
|
||||
debug.Log("tree %v references blob %v which isn't contained in index", id, blobID)
|
||||
errs = append(errs, &Error{TreeID: id, Err: errors.Errorf("file %q blob %v not found in index", node.Name, blobID)})
|
||||
|
@@ -461,11 +461,11 @@ func (r *delayRepository) LoadTree(ctx context.Context, id restic.ID) (*restic.T
|
||||
return restic.LoadTree(ctx, r.Repository, id)
|
||||
}
|
||||
|
||||
func (r *delayRepository) LookupBlobSize(id restic.ID, t restic.BlobType) (uint, bool) {
|
||||
func (r *delayRepository) LookupBlobSize(t restic.BlobType, id restic.ID) (uint, bool) {
|
||||
if id == r.DelayTree && t == restic.DataBlob {
|
||||
r.Unblock()
|
||||
}
|
||||
return r.Repository.LookupBlobSize(id, t)
|
||||
return r.Repository.LookupBlobSize(t, id)
|
||||
}
|
||||
|
||||
func (r *delayRepository) Unblock() {
|
||||
|
Reference in New Issue
Block a user