From ac530ca017e0db2ce3e2354af03d3f32cc05b859 Mon Sep 17 00:00:00 2001 From: Alexander Weiss Date: Fri, 14 Oct 2022 22:03:45 +0200 Subject: [PATCH] fix repair index --- src/commands/repair.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/repair.rs b/src/commands/repair.rs index 7b47ec4..f2ed2aa 100644 --- a/src/commands/repair.rs +++ b/src/commands/repair.rs @@ -118,7 +118,7 @@ async fn repair_index(be: &impl DecryptFullBackend, opts: IndexOpts) -> Result<( match (changed, opts.dry_run) { (true, true) => info!("would have modified index file {index_id}"), (true, false) => { - if !new_index.packs.is_empty() && !new_index.packs_to_delete.is_empty() { + if !new_index.packs.is_empty() || !new_index.packs_to_delete.is_empty() { be.save_file(&new_index).await?; } be.remove(FileType::Index, &index_id, true).await?;