summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rwxr-xr-xscript/borg-restore.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/script/borg-restore.pl b/script/borg-restore.pl
index a2df4a5..dcf6166 100755
--- a/script/borg-restore.pl
+++ b/script/borg-restore.pl
@@ -258,9 +258,10 @@ sub main {
return 0;
}
- if (!$app->cache_contains_data()) {
- $opts{"adhoc"} = 1;
- $log->warning("Cache is empty. --adhoc has been enabled for you automatically");
+ if (!$app->cache_contains_data() && !$opts{adhoc}) {
+ $log->error("Cache is empty. Either the cache path is incorrect or you did not run --update yet.");
+ $log->error("If you did not create a cache yet, you may want to rerun with --adhoc to simply list all backups.");
+ return 1;
}
my @paths = @ARGV;