summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-01 06:44:42 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-01 06:44:42 +0000
commitf0963acb6df75767aaf57c94e1e7509003ff1543 (patch)
treecaab5a83cad07f6fe3efa85385f4bc996ab12923 /lib/File
parentc15a5d5de69fd60182fabfe5d4c4aba46fd1ca8a (diff)
downloadperl-f0963acb6df75767aaf57c94e1e7509003ff1543.tar.gz
consolidated VMS patches (from Craig A. Berry
<craig.berry@metamorgs.com>); Glob.pm patch modified to use $DEFAULT_FLAGS, and iff no flags were supplied p4raw-id: //depot/perl@5397
Diffstat (limited to 'lib/File')
-rw-r--r--lib/File/Find.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/File/Find.pm b/lib/File/Find.pm
index 71cc0e6d90..a5e750e395 100644
--- a/lib/File/Find.pm
+++ b/lib/File/Find.pm
@@ -511,8 +511,9 @@ sub _find_dir($$$) {
while ( defined ($SE = pop @Stack) ) {
($Level, $p_dir, $dir_rel, $nlink) = @$SE;
if ($CdLvl > $Level && !$no_chdir) {
- die "Can't cd to $dir_name" . '../' x ($CdLvl-$Level)
- unless chdir '../' x ($CdLvl-$Level);
+ my $tmp = join('/',('..') x ($CdLvl-$Level));
+ die "Can't cd to $dir_name" . $tmp
+ unless chdir ($tmp);
$CdLvl = $Level;
}
$dir_name = ($p_dir eq '/' ? "/$dir_rel" : "$p_dir/$dir_rel");