summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-08-19 10:58:51 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-08-19 10:58:51 +0200
commit7b4798f7d5a7519b547aad6cb086c1cb84bb6be6 (patch)
tree96b1607483392cb9cfef35a1d441b1c408d37364 /lib
parent7438de8618e320dc1d9a31938097d53dad081771 (diff)
downloadApp-BorgRestore-7b4798f7d5a7519b547aad6cb086c1cb84bb6be6.tar.gz
App-BorgRestore-7b4798f7d5a7519b547aad6cb086c1cb84bb6be6.tar.xz
DB: Do not create directories for special :foo: DBs
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib')
-rw-r--r--lib/App/BorgRestore/DB.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/App/BorgRestore/DB.pm b/lib/App/BorgRestore/DB.pm
index fe8feea..e8f1ce3 100644
--- a/lib/App/BorgRestore/DB.pm
+++ b/lib/App/BorgRestore/DB.pm
@@ -28,7 +28,10 @@ method new($class: $db_path, $cache_size) {
my $self = {};
bless $self, $class;
- if (! -f $db_path) {
+ if ($db_path =~ /^:/) {
+ $self->_open_db($db_path);
+ $self->initialize_db();
+ } elsif (! -f $db_path) {
# ensure the cache directory exists
path($db_path)->parent->mkpath({mode => oct(700)});