]> git.proxmox.com Git - proxmox-backup.git/commitdiff
datastore: increment deleted group counter when removing group
authorChristian Ebner <c.ebner@proxmox.com>
Mon, 11 Nov 2024 15:43:35 +0000 (16:43 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 21 Nov 2024 09:14:53 +0000 (10:14 +0100)
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@proxmox.com>
pbs-datastore/src/backup_info.rs

index 222134074caee43cb048f10204d278047780e8ea..62d12b1183df3a42f217bc30f9c8dd766aaa41ba 100644 (file)
@@ -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)