[pbs-devel] [PATCH proxmox-backup 4/4] api: admin/datastore: reuse 'is_protected' implementation

Dominik Csapak d.csapak at proxmox.com
Thu Oct 28 11:47:55 CEST 2021


we already have that

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/api2/admin/datastore.rs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs
index b9bcde12..dcc89147 100644
--- a/src/api2/admin/datastore.rs
+++ b/src/api2/admin/datastore.rs
@@ -1786,9 +1786,7 @@ pub fn get_protection(
 
     check_priv_or_backup_owner(&datastore, backup_dir.group(), &auth_id, PRIV_DATASTORE_AUDIT)?;
 
-    let protected_path = backup_dir.protected_file(datastore.base_path());
-
-    Ok(protected_path.exists())
+    Ok(backup_dir.is_protected(datastore.base_path()))
 }
 
 #[api(
-- 
2.30.2






More information about the pbs-devel mailing list