mirror of
https://github.com/octoleo/restic.git
synced 2025-01-02 22:50:19 +00:00
repository: Use existing method to collect pack ids
This commit is contained in:
parent
b335cb6285
commit
cf5cb673fb
@ -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 New Issue
Block a user