From df5c6a11cdab2c539ba77603f41cb891641db918 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sun, 24 Apr 2022 17:58:12 +0200 Subject: [PATCH] datastore: list snapshots iter: report group dir in error Signed-off-by: Thomas Lamprecht --- pbs-datastore/src/datastore.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs index e7682856..5aece069 100644 --- a/pbs-datastore/src/datastore.rs +++ b/pbs-datastore/src/datastore.rs @@ -1209,8 +1209,10 @@ pub struct ListSnapshots { impl ListSnapshots { pub fn new(group: BackupGroup) -> Result { + 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, }) }