Skip to content

Commit 204b4d7

Browse files
smpetersSteve Hay
authored andcommitted
[perl #37223] [PATCH] File::Find::find fails on Win32 with follow => 1
From: "Steve Peters via RT" <perlbug-followup@perl.org> Message-ID: <rt-3.0.11-37223-121392.15.8703994486314@perl.org> and update docs p4raw-id: //depot/perl@25597
1 parent 667342e commit 204b4d7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/File/Find.pm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ a dangling symbolic link, then fullname will be set to C<undef>.
131131
132132
=back
133133
134+
This is a no-op on Win32.
135+
134136
=item C<follow_fast>
135137
136138
This is similar to I<follow> except that it may report some files more
@@ -139,6 +141,8 @@ have to be hashed, this is much cheaper both in space and time. If
139141
processing a file more than once (by the user's C<wanted()> function)
140142
is worse than just taking time, the option I<follow> should be used.
141143
144+
This is also a no-op on Win32.
145+
142146
=item C<follow_skip>
143147
144148
C<follow_skip==1>, which is the default, causes all files which are
@@ -603,8 +607,9 @@ sub _find_opt {
603607
$pre_process = $wanted->{preprocess};
604608
$post_process = $wanted->{postprocess};
605609
$no_chdir = $wanted->{no_chdir};
606-
$full_check = $wanted->{follow};
607-
$follow = $full_check || $wanted->{follow_fast};
610+
$full_check = $^O eq 'MSWin32' ? 0 : $wanted->{follow};
611+
$follow = $full_check || $^O eq 'MSWin32' ? 0 :
612+
$wanted->{follow_fast};
608613
$follow_skip = $wanted->{follow_skip};
609614
$untaint = $wanted->{untaint};
610615
$untaint_pat = $wanted->{untaint_pattern};

0 commit comments

Comments
 (0)