diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-08-19 10:58:51 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-08-19 10:58:51 +0200 |
commit | 7b4798f7d5a7519b547aad6cb086c1cb84bb6be6 (patch) | |
tree | 96b1607483392cb9cfef35a1d441b1c408d37364 | |
parent | 7438de8618e320dc1d9a31938097d53dad081771 (diff) | |
download | App-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>
-rw-r--r-- | lib/App/BorgRestore/DB.pm | 5 |
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)}); |