diff options
-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)}); |