From a95f0a1f84e33faaee307241ecbc9f1b82e7e066 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 14 Feb 2015 23:58:26 +0200 Subject: [PATCH] Chdir manually in _unpack_tar_to_dir instead of using tar -C --- lib/Zeal/Feed.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Zeal/Feed.pm b/lib/Zeal/Feed.pm index 5964cfe..b4bbc52 100644 --- a/lib/Zeal/Feed.pm +++ b/lib/Zeal/Feed.pm @@ -58,19 +58,19 @@ sub url { sub _unpack_tar_to_dir { my ($file, $dir) = @_; + $file = rel2abs $file; + my $oldwd = getcwd; + chdir $dir; my $tar = which 'tar' or which 'gtar'; if ($tar && !$ENV{ZEAL_USE_INTERNAL_TAR}) { my $arg = '-xf'; $arg = '-xzf' if $file =~ /[.]t?gz$/; $arg = '-xjf' if $file =~ /[.]bz2$/; - system $tar, -C => $dir, $arg => $file + system $tar, $arg => $file } else { - $file = rel2abs $file; - my $oldwd = getcwd; - chdir $dir; Archive::Tar->extract_archive($file); - chdir $oldwd; } + chdir $oldwd; } sub download { -- 2.39.2