# New Ticket Created by Steve Hay # Please include the string: [perl #37223] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37223 >
This is a bug report for perl from [EMAIL PROTECTED], generated with the help of perlbug 1.35 running under perl v5.8.7. ----------------------------------------------------------------- [Please enter your report here] The File::Find::find() function fails on Win32 if the "follow => 1" option is specified. The following test script demonstrates the problem: use strict; use warnings; use Cwd; use File::Find; my $cwd = cwd(); my $dir = '__empty__test__dir__'; my $i = 0; eval { $i++; mkdir $dir or die; find({wanted => sub { 1 }, follow => 1}, $dir); print STDERR "ok $i\n"; $i++; open my $fh, ">$dir/file" or die; close $fh; find({wanted => sub { 1 }, follow => 1}, $dir); print STDERR "ok $i\n"; $i++; mkdir "$dir/dir" or die; find({wanted => sub { 1 }, follow => 1}, $dir); print STDERR "ok $i\n"; }; print STDERR "not ok $i: $@" if $@; END { chdir $cwd; rmdir "$dir/dir"; unlink "$dir/file"; rmdir $dir } This produces the following output on my Windows XP machine: ok 1 ok 2 not ok 3: C:/Temp/__empty__test__dir__/dir encountered a second time at C:/perl5/lib/File/Find.pm line 560. Changing the third "follow => 1" to "follow => 0" fixes the failure. Presumably "follow" (and "follow_fast"?) should be no-ops on Win32 since symbolic links are not supported on that OS. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=library severity=medium --- Site configuration information for perl v5.8.7: Configured by steveh at Fri Jun 3 11:58:14 2005. Summary of my perl5 (revision 5 version 8 subversion 7) configuration: Platform: osname=MSWin32, osvers=5.1, archname=MSWin32-x86-perlio uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=y, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_DEBUGGING_MSTATS -DUSE_PERLIO -DPERL_MSVCRT_READFIX', optimize='-MD -Zi -DNDEBUG -O1', cppflags='-DWIN32' ccversion='12.00.8804', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\perl5\lib\CORE" -machine:x86' libpth=C:\PROGRA~1\MICROS~2\VC98\lib libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib gnulibc_version='undef' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\perl5\lib\CORE" -machine:x86' Locally applied patches: --- @INC for perl v5.8.7: C:/perl5/lib C:/perl5/site/lib . --- Environment for perl v5.8.7: HOME (unset) LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\perl5\bin;U:\scripts\batch;C:\Program Files\ZipGenius 6\;C:\Program Files\Sybase\SQL Anywhere 8\win32;C:\Program Files\Sybase\Shared\win32;C:\Program Files\Sybase\SQL Anywhere 8\drivers;C:\Program Files\Sybase\Shared\Sybase Central 4.1;C:\Program Files\Subversion\bin PERL_BADLANG (unset) SHELL (unset) ------------------------------------------------ Radan Computational Ltd. The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.