mirror of
https://github.com/restic/restic.git
synced 2025-12-02 13:52:02 +00:00
repository: fix parameter order of LookupBlobSize
All methods should use blobType followed by ID.
This commit is contained in:
@@ -72,7 +72,7 @@ func (f *file) Open(_ context.Context, _ *fuse.OpenRequest, _ *fuse.OpenResponse
|
||||
var bytes uint64
|
||||
cumsize := make([]uint64, 1+len(f.node.Content))
|
||||
for i, id := range f.node.Content {
|
||||
size, found := f.root.repo.LookupBlobSize(id, restic.DataBlob)
|
||||
size, found := f.root.repo.LookupBlobSize(restic.DataBlob, id)
|
||||
if !found {
|
||||
return nil, errors.Errorf("id %v not found in repository", id)
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ func TestFuseFile(t *testing.T) {
|
||||
memfile []byte
|
||||
)
|
||||
for _, id := range content {
|
||||
size, found := repo.LookupBlobSize(id, restic.DataBlob)
|
||||
size, found := repo.LookupBlobSize(restic.DataBlob, id)
|
||||
rtest.Assert(t, found, "Expected to find blob id %v", id)
|
||||
filesize += uint64(size)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user