From: Craig A. Berry Date: Mon, 21 Jul 2003 19:40:20 +0000 (-0500) Subject: fix for File::Find logical name collision on VMS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=544ff7a7d95184b2fa52aea494e7e49ede73c1a7;p=p5sagit%2Fp5-mst-13.2.git fix for File::Find logical name collision on VMS From: "Craig A. Berry" Message-ID: <3F1C87F4.2070401@mac.com> p4raw-id: //depot/perl@20221 --- diff --git a/lib/File/Find.pm b/lib/File/Find.pm index fc09503..8136cf1 100644 --- a/lib/File/Find.pm +++ b/lib/File/Find.pm @@ -668,7 +668,7 @@ sub _find_opt { next Proc_Top_Item; } if (-d _) { - $top_item =~ s/\.dir\z// if $Is_VMS; + $top_item =~ s/\.dir\z//i if $Is_VMS; _find_dir($wanted, $top_item, $topnlink); $Is_Dir= 1; } @@ -769,7 +769,7 @@ sub _find_dir($$$) { } } } - unless (chdir $udir) { + unless (chdir ($Is_VMS && $udir !~ /\// ? "./$udir" : $udir)) { warnings::warnif "Can't cd to $udir: $!\n"; return; } @@ -811,7 +811,7 @@ sub _find_dir($$$) { } } } - unless (chdir $udir) { + unless (chdir ($Is_VMS && $udir !~ /\// ? "./$udir" : $udir)) { if ($Is_MacOS) { warnings::warnif "Can't cd to ($p_dir) $udir: $!\n"; } @@ -876,7 +876,7 @@ sub _find_dir($$$) { if (-d _) { --$subcount; - $FN =~ s/\.dir\z// if $Is_VMS; + $FN =~ s/\.dir\z//i if $Is_VMS; # HACK: replace push to preserve dir traversal order #push @Stack,[$CdLvl,$dir_name,$FN,$sub_nlink]; splice @Stack, $stack_top, 0,