diff options
Diffstat (limited to 'script')
-rwxr-xr-x | script/borg-restore.pl | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/script/borg-restore.pl b/script/borg-restore.pl index 2beb306..b30549f 100755 --- a/script/borg-restore.pl +++ b/script/borg-restore.pl @@ -262,16 +262,8 @@ sub main { my $abs_path = $app->resolve_relative_path($path); return 1 unless defined $abs_path; - if (!defined($destination)) { - $destination = dirname($abs_path); - } - my $backup_path = $abs_path; - for my $backup_prefix (@App::BorgRestore::Settings::backup_prefixes) { - if ($backup_path =~ m/$backup_prefix->{regex}/) { - $backup_path =~ s/$backup_prefix->{regex}/$backup_prefix->{replacement}/; - last; - } - } + $destination = dirname($abs_path) unless defined($destination); + my $backup_path = $app->map_path_to_backup_path($abs_path); $log->debug("Asked to restore $backup_path to $destination"); |