[pbs-devel] [PATCH v7 proxmox-backup 13/31] datastore: increment deleted group counter when removing group

Christian Ebner c.ebner at proxmox.com
Mon Nov 11 16:43:35 CET 2024


To correctly account also for the number of deleted backup groups, in
preparation to correctly return the delete statistics when removing
contents via the REST API.

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
changes since version 6:
- no changes

 pbs-datastore/src/backup_info.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pbs-datastore/src/backup_info.rs b/pbs-datastore/src/backup_info.rs
index 222134074..62d12b118 100644
--- a/pbs-datastore/src/backup_info.rs
+++ b/pbs-datastore/src/backup_info.rs
@@ -221,6 +221,7 @@ impl BackupGroup {
             std::fs::remove_dir_all(&path).map_err(|err| {
                 format_err!("removing group directory {:?} failed - {}", path, err)
             })?;
+            delete_stats.increment_removed_groups();
         }
 
         Ok(delete_stats)
-- 
2.39.5





More information about the pbs-devel mailing list