diff options
author | Michael G. Schwern <schwern@pobox.com> | 2001-09-22 23:34:39 -0400 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2001-09-23 06:42:58 +0000 |
commit | 39e79f6b7da6190c441d02fdb038af6bdc815b1e (patch) | |
tree | 469e1bf9a89b2e1bc029143a9e9fa748eaf9c811 | |
parent | 40e90a6793b4542af6e1177e4042d51453acbfae (diff) | |
download | perl-39e79f6b7da6190c441d02fdb038af6bdc815b1e.tar.gz |
Fixing lib/File/Find/t/taint.t on VMS
Message-Id: <20010923033439.E7005@blackrider>
p4raw-id: //depot/perl@12152
-rw-r--r-- | lib/File/Find.pm | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/File/Find.pm b/lib/File/Find.pm index de0b5340e4..ae76323e4c 100644 --- a/lib/File/Find.pm +++ b/lib/File/Find.pm @@ -641,16 +641,14 @@ sub _find_dir($$$) { my $SE= []; my $dir_name= $p_dir; my $dir_pref; - my $dir_rel; + my $dir_rel = $File::Find::current_dir; my $tainted = 0; if ($Is_MacOS) { $dir_pref= ($p_dir =~ /:$/) ? $p_dir : "$p_dir:"; # preface - $dir_rel= ':'; # directory name relative to current directory } else { $dir_pref= ( $p_dir eq '/' ? '/' : "$p_dir/" ); - $dir_rel= '.'; # directory name relative to current directory } local ($dir, $name, $prune, *DIR); @@ -809,12 +807,7 @@ sub _find_dir($$$) { if ( $nlink == -2 ) { $name = $dir = $p_dir; # $File::Find::name / dir - if ($Is_MacOS) { - $_ = ':'; # $_ - } - else { - $_ = '.'; - } + $_ = $File::Find::current_dir; &$post_process; # End-of-directory processing } elsif ( $nlink < 0 ) { # must be finddepth, report dirname now @@ -865,7 +858,7 @@ sub _find_dir_symlnk($$$) { my $dir_name = $p_dir; my $dir_pref; my $loc_pref; - my $dir_rel; + my $dir_rel = $File::Find::current_dir; my $byd_flag; # flag for pending stack entry if $bydepth my $tainted = 0; my $ok = 1; @@ -873,11 +866,9 @@ sub _find_dir_symlnk($$$) { if ($Is_MacOS) { $dir_pref = ($p_dir =~ /:$/) ? "$p_dir" : "$p_dir:"; $loc_pref = ($dir_loc =~ /:$/) ? "$dir_loc" : "$dir_loc:"; - $dir_rel = ':'; # directory name relative to current directory } else { $dir_pref = ( $p_dir eq '/' ? '/' : "$p_dir/" ); $loc_pref = ( $dir_loc eq '/' ? '/' : "$dir_loc/" ); - $dir_rel = '.'; # directory name relative to current directory } local ($dir, $name, $fullname, $prune, *DIR); |