develooper Front page | perl.perl5.porters | Postings from July 2001

Re: Bug in File::Find

Thread Previous
From:
B. Cowgill
Date:
July 30, 2001 08:33
Subject:
Re: Bug in File::Find
Message ID:
3B657DEF.9137EA01@infoserve.net
Thanks for the info, Nicholas I never would have guessed, my POD for 
File::Find only says: 
 Set the variable `$File::Find::dont_use_nlink' if you're
       using AFS, since AFS cheats.
      
And I'm not using AFS so I never thought it was relevant.

Anyway, I tried setting it and the tests work so that is indeed the 
problem.  Thanks a bunch.

B. Cowgill

Nicholas Clark wrote:
> 
> On Thu, Jul 26, 2001 at 11:26:48AM -0700, B. Cowgill wrote:
> > I believe I have discovered a bug in File::Find. It only happens for me
> > when running perl on a linux box while trying to find files within
> > a directory which is mounted with smbmount.  The samba server is a Win2K
> > box.
> >
> > Is this the right place to send a bug report?  If so, let me know and
> > I'll
> > send all the details, with a sample program and test plan.
> 
> Strictly perlbug@perl.org is the correct place to send a bug report, as
> that will enter the report into the bugs database and then forward it here.
> 
> Looking at a samba mount here I see
> 
> drwxr-xr-x    1 nclark   nclark        512 Jul 18 12:09 Customers
> drwxr-xr-x    1 nclark   nclark        512 Jul 26 12:26 Development
> 
>               ^ link count is 1
> 
> By default File::Find is assuming that it can rely on a directory's link
> count being 2 + number of sub directories, which holds true on nearly all
> Unix file system types.
> 
> You can turn this assumption off by setting $File::Find::dont_use_nlink = 1;
> which should work on File::Find at least as far back as 5.004_05.
> 
> There was a long thread about this link count assumption starting at
> http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-02/msg00563.html
> 
> There's a summary of that thread in "This Week on perl5-porters" archived as:
> http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-02/msg01036.html
> but it does seem that even the most recent development File::Find is still
> making this link count assumption.
> 
> Could you try setting $File::Find::dont_use_nlink = 1; in your script and
> report whether this solves your problem?
> 
> Thanks
> 
> Nicholas Clark
> --
> EAGAIN: http://plum.flirble.org/~nick/CV.html

Thread Previous


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