summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/dist/PathTools/lib/File/Spec.pm
diff options
context:
space:
mode:
authorafresh1 <afresh1@openbsd.org>2019-02-13 21:15:00 +0000
committerafresh1 <afresh1@openbsd.org>2019-02-13 21:15:00 +0000
commit9f11ffb7133c203312a01e4b986886bc88c7d74b (patch)
tree6618511204c614b20256e4ef9dea39a7b311d638 /gnu/usr.bin/perl/dist/PathTools/lib/File/Spec.pm
parentImport perl-5.28.1 (diff)
downloadwireguard-openbsd-9f11ffb7133c203312a01e4b986886bc88c7d74b.tar.xz
wireguard-openbsd-9f11ffb7133c203312a01e4b986886bc88c7d74b.zip
Fix merge issues, remove excess files - match perl-5.28.1 dist
looking good sthen@, Great! bluhm@
Diffstat (limited to 'gnu/usr.bin/perl/dist/PathTools/lib/File/Spec.pm')
-rw-r--r--gnu/usr.bin/perl/dist/PathTools/lib/File/Spec.pm17
1 files changed, 9 insertions, 8 deletions
diff --git a/gnu/usr.bin/perl/dist/PathTools/lib/File/Spec.pm b/gnu/usr.bin/perl/dist/PathTools/lib/File/Spec.pm
index 3ef0f339db3..85327ee0da3 100644
--- a/gnu/usr.bin/perl/dist/PathTools/lib/File/Spec.pm
+++ b/gnu/usr.bin/perl/dist/PathTools/lib/File/Spec.pm
@@ -1,16 +1,14 @@
package File::Spec;
use strict;
-use vars qw(@ISA $VERSION);
-$VERSION = '3.63_01';
+our $VERSION = '3.74';
$VERSION =~ tr/_//d;
-my %module = (MacOS => 'Mac',
+my %module = (
MSWin32 => 'Win32',
os2 => 'OS2',
VMS => 'VMS',
- epoc => 'Epoc',
NetWare => 'Win32', # Yes, File::Spec::Win32 works on NetWare.
symbian => 'Win32', # Yes, File::Spec::Win32 works on symbian.
dos => 'OS2', # Yes, File::Spec::OS2 works on DJGPP.
@@ -21,7 +19,7 @@ my %module = (MacOS => 'Mac',
my $module = $module{$^O} || 'Unix';
require "File/Spec/$module.pm";
-@ISA = ("File::Spec::$module");
+our @ISA = ("File::Spec::$module");
1;
@@ -158,10 +156,13 @@ Returns a string representation of the parent directory.
=item no_upwards
-Given a list of file names, strip out those that refer to a parent
-directory. (Does not strip symlinks, only '.', '..', and equivalents.)
+Given a list of files in a directory (such as from C<readdir()>),
+strip out C<'.'> and C<'..'>.
- @paths = File::Spec->no_upwards( @paths );
+B<SECURITY NOTE:> This does NOT filter paths containing C<'..'>, like
+C<'../../../../etc/passwd'>, only literal matches to C<'.'> and C<'..'>.
+
+ @paths = File::Spec->no_upwards( readdir $dirhandle );
=item case_tolerant