api: admin/datastore: reuse 'is_protected' implementation

we already have that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-10-28 11:47:55 +02:00 committed by Wolfgang Bumiller
parent 9b5ecbe2ff
commit 9b1e2ae83c
1 changed files with 1 additions and 3 deletions

View File

@ -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(