delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/11/08/04:49:51

X-Spam-Check-By: sourceware.org
Cc: lindnerben AT gmx DOT net
Date: Wed, 08 Nov 2006 10:49:31 +0100
From: "Benjamin Lindner" <lindnerben AT gmx DOT net>
Message-ID: <20061108094931.69630@gmx.net>
MIME-Version: 1.0
Subject: Re: 1.5.21-1 readdir() not returning complete directory entries for network paths after rewinddir()
To: cygwin AT cygwin DOT com
X-Authenticated: #3308189
X-Flags: 0001
X-Mailer: WWW-Mail 6100 (Global Message Exchange)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

> 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019