diff options
author | Florian Pritz <bluewind@xinu.at> | 2017-04-02 11:23:23 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2017-04-02 13:42:15 +0200 |
commit | 97e89588a0cc383e357e7d72ae529bc7217d9847 (patch) | |
tree | f0026dffce18d4ee87e0340bc0c1edea5336fdb0 | |
parent | 69164595e42dd8acd9db32c78298972ce29bebe6 (diff) | |
download | App-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>
-rwxr-xr-x | script/borg-restore.pl | 5 |
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)) { |