summaryrefslogtreecommitdiffstats
path: root/lib/App/BorgRestore.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/App/BorgRestore.pm')
-rw-r--r--lib/App/BorgRestore.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/App/BorgRestore.pm b/lib/App/BorgRestore.pm
index 2ae0a09..8716bfb 100644
--- a/lib/App/BorgRestore.pm
+++ b/lib/App/BorgRestore.pm
@@ -6,7 +6,7 @@ our $VERSION = "3.3.0";
use App::BorgRestore::Borg;
use App::BorgRestore::DB;
-use App::BorgRestore::Helper;
+use App::BorgRestore::Helper qw(untaint);
use App::BorgRestore::PathTimeTable::DB;
use App::BorgRestore::PathTimeTable::Memory;
use App::BorgRestore::Settings;
@@ -327,8 +327,8 @@ process during method execution since this is required by C<`borg extract`>.
=cut
method restore($path, $archive, $destination) {
- $destination = App::BorgRestore::Helper::untaint($destination, qr(.*));
- $path = App::BorgRestore::Helper::untaint($path, qr(.*));
+ $destination = untaint($destination, qr(.*));
+ $path = untaint($path, qr(.*));
$log->infof("Restoring %s to %s from archive %s", $path, $destination, $archive->{archive});
@@ -342,7 +342,7 @@ method restore($path, $archive, $destination) {
my $workdir = pushd($destination, {untaint_pattern => qr{^(.*)$}});
my $final_destination = abs_path($basename);
- $final_destination = App::BorgRestore::Helper::untaint($final_destination, qr(.*));
+ $final_destination = untaint($final_destination, qr(.*));
$log->debugf("Removing %s", $final_destination);
File::Path::remove_tree($final_destination);
$self->{deps}->{borg}->restore($components_to_strip, $archive->{archive}, $path);