datastore: add additional context for get_owner parsing error
By this it becomes clear that the error stems from a parsing error when getting the backup group owner. See also: https://forum.proxmox.com/threads/139482/ Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
2dd9f98fde
commit
de6b0ea35a
@ -602,7 +602,12 @@ impl DataStore {
|
||||
) -> Result<Authid, Error> {
|
||||
let full_path = self.owner_path(ns, backup_group);
|
||||
let owner = proxmox_sys::fs::file_read_firstline(full_path)?;
|
||||
owner.trim_end().parse() // remove trailing newline
|
||||
owner
|
||||
.trim_end() // remove trailing newline
|
||||
.parse()
|
||||
.map_err(|err| {
|
||||
format_err!("parsing owner for {backup_group} failed: {err}")
|
||||
})
|
||||
}
|
||||
|
||||
pub fn owns_backup(
|
||||
|
Loading…
Reference in New Issue
Block a user