summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-11-21 15:56:04 +0100
committerFlorian Pritz <bluewind@xinu.at>2017-11-21 17:18:32 +0100
commit6b9c0d7719afdf85820e703e58b1358c95b6586e (patch)
tree54c5976f8c77f7930b5f314025e9472d25d939d1 /script
parentfe3bc18d25d204c799d42610078509f11954e1c2 (diff)
downloadApp-BorgRestore-6b9c0d7719afdf85820e703e58b1358c95b6586e.tar.gz
App-BorgRestore-6b9c0d7719afdf85820e703e58b1358c95b6586e.tar.xz
Enable --adhoc automatically when cache is empty
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 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;