Merge pull request #85 from rustic-rs/prune-fix-cacheable

prune: fix --repack-cacheable-only in combination with --repack-uncompressed
This commit is contained in:
aawsome 2022-07-28 18:39:28 +02:00 committed by GitHub
commit bc1e5564f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -469,7 +469,11 @@ impl Pruner {
(false, 1.., 0) => {
// used pack
self.stats.packs.used += 1;
if too_young || !repack_uncompressed || pack.is_compressed() {
if too_young
|| !repack_uncompressed
|| pack.is_compressed()
|| repack_cacheable_only && !pack.blob_type.is_cacheable()
{
pack.set_todo(PackToDo::Keep, &pi, &mut self.stats);
} else {
self.repack_candidates.push((pi, index_num, pack_num));