From 7b4798f7d5a7519b547aad6cb086c1cb84bb6be6 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 19 Aug 2018 10:58:51 +0200 Subject: DB: Do not create directories for special :foo: DBs Signed-off-by: Florian Pritz --- lib/App/BorgRestore/DB.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') 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)}); -- cgit v1.2.3-24-g4f1b