catalog_shell: do not restore full archive if no entries are selected for restore-selected

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
Christian Ebner 2019-11-26 11:33:27 +01:00 committed by Dietmar Maurer
parent 12b4098660
commit 4e56b2f792
1 changed files with 3 additions and 0 deletions

View File

@ -381,6 +381,9 @@ impl Shell {
.ok_or_else(|| format_err!("encountered invalid match pattern"))?;
list.push(pattern);
}
if list.is_empty() {
bail!("no entries selected for restore");
}
// Entry point for the restore is always root here as the provided match
// patterns are relative to root as well.