summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-04-02 11:23:23 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-04-02 13:42:15 +0200
commit97e89588a0cc383e357e7d72ae529bc7217d9847 (patch)
treef0026dffce18d4ee87e0340bc0c1edea5336fdb0 /script
parent69164595e42dd8acd9db32c78298972ce29bebe6 (diff)
downloadApp-BorgRestore-97e89588a0cc383e357e7d72ae529bc7217d9847.tar.gz
App-BorgRestore-97e89588a0cc383e357e7d72ae529bc7217d9847.tar.xz
script: Abort early if path is not found in backups
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'script')
-rwxr-xr-xscript/borg-restore.pl5
1 files changed, 5 insertions, 0 deletions
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)) {