mirror of
https://github.com/restic/restic.git
synced 2024-12-22 15:57:07 +00:00
repository: Use existing method to collect pack ids
This commit is contained in:
parent
b335cb6285
commit
cf5cb673fb
1 changed files with 1 additions and 6 deletions
|
@ -736,12 +736,7 @@ func (r *Repository) PrepareCache() error {
|
||||||
fmt.Fprintf(os.Stderr, "error clearing index files in cache: %v\n", err)
|
fmt.Fprintf(os.Stderr, "error clearing index files in cache: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
packs := restic.NewIDSet()
|
packs := r.idx.Packs(restic.NewIDSet())
|
||||||
for _, idx := range r.idx.All() {
|
|
||||||
for id := range idx.Packs() {
|
|
||||||
packs.Insert(id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// clear old packs
|
// clear old packs
|
||||||
err = r.Cache.Clear(restic.PackFile, packs)
|
err = r.Cache.Clear(restic.PackFile, packs)
|
||||||
|
|
Loading…
Reference in a new issue