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

Re: Bug in File::Find

Thread Previous | Thread Next
Nicholas Clark
July 27, 2001 03:23
Re: Bug in File::Find
Message ID:
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 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

There's a summary of that thread in "This Week on perl5-porters" archived as:
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?


Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About