develooper Front page | perl.perl5.porters | Postings from May 2008

Re: [perl #41555] Bug in File::Find on Windows when target dir isbare drive letter and no_chdir = 1

Thread Previous | Thread Next
From:
David Landgren
Date:
May 5, 2008 13:47
Subject:
Re: [perl #41555] Bug in File::Find on Windows when target dir isbare drive letter and no_chdir = 1
Message ID:
481F7291.6060309@landgren.net
Bram via RT wrote:
> On Tue Feb 20 09:39:44 2007, johndporter@yahoo.com wrote:
>> Bug in File::Find on Windows when target dir is bare drive letter and
>> no_chdir = 1
>>
> [...]
>> 	perl -MFile::Find -e "$\=$/; find({ no_chdir => 1, wanted => 
> sub {
>> print if -d } }, 'c:' );"
>>
> 
> Patch attached.
> 
> File::Find turned c: into c:/  (which is a completly different path).
> 
> No tests for it added. (No idea how this can be tested automatically)

Without looking at what you can recycle from the current test suite...

Create a subdir on the current drive (might be D:, E: or other), 
populate it with two or three temp files in a couple of subdirs, chdir 
to the first subdir and then go and File::Find them using C: as your 
starting point.

You may need to skip if $^O ne 'Win32'.

David


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About