From 6b9c0d7719afdf85820e703e58b1358c95b6586e Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 21 Nov 2017 15:56:04 +0100 Subject: Enable --adhoc automatically when cache is empty 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 d6e97e5..f58ba33 100755 --- a/script/borg-restore.pl +++ b/script/borg-restore.pl @@ -235,6 +235,11 @@ sub main { return 0; } + if (!$app->cache_contains_data()) { + $opts{"adhoc"} = 1; + $log->warning("Cache is empty. --adhoc has been enabled for you automatically"); + } + my @paths = @ARGV; my $path; -- cgit v1.2.3-24-g4f1b