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(),
|
||||
time: info.backup_dir.backup_time(),
|
||||
};
|
||||
let protected = info.backup_dir.is_protected();
|
||||
let protected = info.protected;
|
||||
|
||||
match get_all_snapshot_files(&info) {
|
||||
Ok((manifest, files)) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user