api: tape restore: warn if snapshot could not get parsed

unlikely, but cost is far too low to not do it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-06-07 14:18:46 +02:00
parent 72b550a836
commit ce9b00e7e3

View File

@ -633,6 +633,10 @@ fn restore_list_worker(
for (store, snapshot) in catalog.list_snapshots() {
let (ns, dir) = match parse_ns_and_snapshot(&snapshot) {
Ok((ns, dir)) if store_map.has_full_mapping(store, &ns) => (ns, dir),
Err(err) => {
task_warn!(worker, "couldn't parse snapshot {snapshot} - {err}");
continue;
},
_ => continue,
};
let snapshot = print_ns_and_snapshot(&ns, &dir);