In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/b242981a2f3ddf59927068da9ceb3c676d7d5815?hp=aa0aae5728542a34889d86fbfbffcab63f40a404>
- Log ----------------------------------------------------------------- commit b242981a2f3ddf59927068da9ceb3c676d7d5815 Author: Alex Davies <[email protected]> Date: Fri Sep 24 00:12:27 2010 -0700 The rest of [perl #71710] fixes for File::Find The code is from Alex Davies. The commit message is from the committer. Somehow I only ended up with half the patch applied. No tests failed for me, because these code paths are only reached on Windows, which, thankfully, I am not using. Hopefully this will eliminate the smoke that is already pouring in.... (Itâs *my* turn to break blead for Windows. :-) ----------------------------------------------------------------------- Summary of changes: lib/File/Find.pm | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/File/Find.pm b/lib/File/Find.pm index 27c9466..92fe636 100644 --- a/lib/File/Find.pm +++ b/lib/File/Find.pm @@ -927,8 +927,9 @@ sub _find_dir($$$) { $CdLvl = $Level; } - if ($^O eq 'MSWin32') { - $dir_name = ($p_dir =~ m|\w:/?$| ? "$p_dir$dir_rel" : "$p_dir/$dir_rel"); + if ($Is_Win32) { + $dir_name = ($p_dir =~ m{^(?:\w:[/\\]?|[/\\])$} + ? "$p_dir$dir_rel" : "$p_dir/$dir_rel"); $dir_pref = "$dir_name/"; } elsif ($^O eq 'VMS') { @@ -1206,13 +1207,16 @@ if ($^O eq 'VMS') { $Is_VMS = 1; $File::Find::dont_use_nlink = 1; } +elsif ($^O eq 'MSWin32') { + $Is_Win32 = 1; +} # this _should_ work properly on all platforms # where File::Find can be expected to work $File::Find::current_dir = File::Spec->curdir || '.'; $File::Find::dont_use_nlink = 1 - if $^O eq 'os2' || $^O eq 'dos' || $^O eq 'amigaos' || $^O eq 'MSWin32' || + if $^O eq 'os2' || $^O eq 'dos' || $^O eq 'amigaos' || $Is_Win32 || $^O eq 'interix' || $^O eq 'cygwin' || $^O eq 'epoc' || $^O eq 'qnx' || $^O eq 'nto'; -- Perl5 Master Repository
