From 97e89588a0cc383e357e7d72ae529bc7217d9847 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 2 Apr 2017 11:23:23 +0200 Subject: script: Abort early if path is not found in backups Signed-off-by: Florian Pritz --- script/borg-restore.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'script') diff --git a/script/borg-restore.pl b/script/borg-restore.pl index 7843270..0859e4e 100755 --- a/script/borg-restore.pl +++ b/script/borg-restore.pl @@ -283,6 +283,11 @@ sub main { my $archives = $app->find_archives($backup_path); + if (!@$archives) { + $log->fatal("No archives found for path"); + return 1; + } + my $selected_archive; if (defined($timespec)) { -- cgit v1.2.3-24-g4f1b