diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-12-17 14:55:14 +0100 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-12-17 14:55:14 +0100 |
commit | 8630d22244b92e80ad52144a4e43ea7b5a542402 (patch) | |
tree | ce6dca3df60ae025f68ac4a6c7e4694db48b20fd | |
parent | 37edbef65e31a597cda1308c5f5341bd55f50bc6 (diff) | |
download | slackbuilder-8630d22244b92e80ad52144a4e43ea7b5a542402.tar.gz slackbuilder-8630d22244b92e80ad52144a4e43ea7b5a542402.tar.bz2 |
Fix recursive download
* lib/SlackBuild/Archive.pm (add_file): Skip any entries with /./
and /../ in the path name.
-rw-r--r-- | lib/SlackBuild/Archive.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/SlackBuild/Archive.pm b/lib/SlackBuild/Archive.pm index 746592b..83001f5 100644 --- a/lib/SlackBuild/Archive.pm +++ b/lib/SlackBuild/Archive.pm @@ -37,7 +37,10 @@ sub iterate { sub add_file { my $self = shift; - push @{$self->{_dir}}, File::Spec->no_upwards(map { s{/$}{}; $_ } @_); + push @{$self->{_dir}}, map { + s{/$}{}; + File::Spec->no_upwards(basename($_)) ? $_ : () + } @_; } sub has_file { |