datastore: list snapshots iter: report group dir in error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-04-24 17:58:12 +02:00
parent 07a683d266
commit df5c6a11cd
1 changed files with 3 additions and 1 deletions

View File

@ -1209,8 +1209,10 @@ pub struct ListSnapshots {
impl ListSnapshots {
pub fn new(group: BackupGroup) -> Result<Self, Error> {
let group_path = group.full_group_path();
Ok(ListSnapshots {
fd: proxmox_sys::fs::read_subdir(libc::AT_FDCWD, &group.full_group_path())?,
fd: proxmox_sys::fs::read_subdir(libc::AT_FDCWD, &group_path)
.map_err(|err| format_err!("read dir {group_path:?} - {err}"))?,
group,
})
}