From 4e56b2f792a4f88e8f3570bb8d5adc4aee089d85 Mon Sep 17 00:00:00 2001 From: Christian Ebner Date: Tue, 26 Nov 2019 11:33:27 +0100 Subject: [PATCH] catalog_shell: do not restore full archive if no entries are selected for restore-selected Signed-off-by: Christian Ebner --- src/backup/catalog_shell.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backup/catalog_shell.rs b/src/backup/catalog_shell.rs index 286f6ef6..d0257204 100644 --- a/src/backup/catalog_shell.rs +++ b/src/backup/catalog_shell.rs @@ -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.