Subject: Re: 1.5.21-1 readdir() not returning complete directory entries for network paths after rewinddir()
From: "Benjamin Lindner" <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Wed, 08 Nov 2006 10:49:31 +0100

> On Oct 23 16:21, Corinna Vinschen wrote:
> > On Oct 23 13:50, Benjamin Lindner wrote:
> > > Hello list,
> > > 
> > > Issuing a rewinddir() on a mounted network path caues successive calls 
> > > to readdir() to only return "." and ".." ignoring the actual further 
> > > content of the directory.
> > > [...]
> > Further debugging showed that this is a bug in W2K.  The function
> > NtQueryDirectoryFile apparently ignores the "RestartScan" parameter when
> > being called on a remote directory.  It does not depend on the file
> > system type, it happens with remote FAT, NTFS as well as Samba shares.
> > This bug is not present in NT4, nor in XP and above.
> 
> I've applied a patch to CVS.  Please give the next developer's snapshot
> from http://cygwin.com/snapshots/ a try.
> 
> 
> Thanks,
> Corinna

I tried the 20061023 snapshot with the rewdir.c program from
http://www.cygwin.com/ml/cygwin/2006-02/msg00183.html
and it works!

$ rm -rf /cygdrive/u/foo; mkdir /cygdrive/u/foo; touch /cygdrive/u/foo/{bar,baz,quux,quuux,quuuux}
$ ./rewdir.exe /cygdrive/u/foo/
got: .
got: ..
got: bar
got: baz
got: quux
got: quuux
got: quuuux
rewinding.
got: .
got: ..
got: bar
got: baz
got: quux
got: quuux
got: quuuux
rewinding.
got: .
got: ..
got: bar
got: baz
got: quux
got: quuux
got: quuuux
rewinding.

many thanks for the fix!

regards
benjamin
-- 
GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist!
NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/