mirror of
https://github.com/restic/restic.git
synced 2026-11-17 14:54:04 +00:00
Refactor Index.Store() to take a PackedBlob
This commit is contained in:
1 parent
f3f84b1544
commit
1fc0d78913
4 files changed
+66
-19
No files matched your search
@@ -270,7 +270,13 @@ func (r *Repository) savePacker(p *pack.Packer) error {
|
||||
// update blobs in the index
|
||||
for _, b := range p.Blobs() {
|
||||
debug.Log("Repo.savePacker", " updating blob %v to pack %v", b.ID.Str(), sid.Str())
|
||||
r.idx.Current().Store(b.Type, b.ID, sid, b.Offset, uint(b.Length))
|
||||
r.idx.Current().Store(PackedBlob{
|
||||
Type: b.Type,
|
||||
ID: b.ID,
|
||||
PackID: sid,
|
||||
Offset: b.Offset,
|
||||
Length: uint(b.Length),
|
||||
})
|
||||
r.idx.RemoveFromInFlight(b.ID)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user