diff options
-rw-r--r-- | lib/App/BorgRestore.pm | 3 | ||||
-rwxr-xr-x | script/borg-restore.pl | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/App/BorgRestore.pm b/lib/App/BorgRestore.pm index 4891ec9..0c61312 100644 --- a/lib/App/BorgRestore.pm +++ b/lib/App/BorgRestore.pm @@ -11,6 +11,7 @@ use App::BorgRestore::Helper; use App::BorgRestore::Settings; use autodie; +use Carp; use Cwd qw(abs_path getcwd); use File::Basename; use File::Slurp; @@ -114,7 +115,7 @@ sub resolve_relative_path { if (!defined($abs_path)) { $log->fatalf("Failed to resolve path to absolute path: %s: %s", $canon_path, $!); $log->fatal("Make sure that all parts of the path, except the last one, exist."); - return; + croak "Path resolving failed"; } return $abs_path; diff --git a/script/borg-restore.pl b/script/borg-restore.pl index b30549f..1fdc758 100755 --- a/script/borg-restore.pl +++ b/script/borg-restore.pl @@ -260,7 +260,6 @@ sub main { } my $abs_path = $app->resolve_relative_path($path); - return 1 unless defined $abs_path; $destination = dirname($abs_path) unless defined($destination); my $backup_path = $app->map_path_to_backup_path($abs_path); |