mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-05-01 04:05:57 +00:00
datastore: avoid calculating protected attribute twice
The protected status of the snapshot is retrieved twice. This is slow because it stat's the .protected file multiple times. Signed-off-by: Gabriel Goller <g.goller@proxmox.com> Tested-by: Christian Ebner <c.ebner@proxmox.com> Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
625e2fd95f
commit
0e9aa78bf4
@ -505,7 +505,7 @@ unsafe fn list_snapshots_blocking(
|
|||||||
group: group.into(),
|
group: group.into(),
|
||||||
time: info.backup_dir.backup_time(),
|
time: info.backup_dir.backup_time(),
|
||||||
};
|
};
|
||||||
let protected = info.backup_dir.is_protected();
|
let protected = info.protected;
|
||||||
|
|
||||||
match get_all_snapshot_files(&info) {
|
match get_all_snapshot_files(&info) {
|
||||||
Ok((manifest, files)) => {
|
Ok((manifest, files)) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user