Subject: 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: Mon, 23 Oct 2006 13:50:39 +0200

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.

I searched the mailing list and found the following two bug reports 
dealing with this problem:
http://www.cygwin.com/ml/cygwin/2006-01/msg01423.html
http://www.cygwin.com/ml/cygwin/2006-02/msg00183.html

In the second report the same problem is reported, and there was a fix 
proposed. It works correct for local directories, but not for directories
mounted with "net use".

following testcase:
$ ls -la /cygdrive/u/testing
total 4.0K
drwxr-xr-x 1 lindnebe DUsers  0 Oct 16 17:27 ./
drwxr-xr-x 1 lindnebe DUsers  0 Jan  1  1970 ../
-rw-r--r-- 1 lindnebe DUsers 77 Oct 16 11:16 mytestfunction.m

$ ./readdirtest.exe /cygdrive/u/testing
Entry 0: <.>
Entry 1: <..>
Entry 2: <mytestfunction.m>
count=3
rewinding
Entry 0: <.>
Entry 1: <..>
Entry 2: NULL
Entry 3: NULL
Entry 4: NULL
Entry 5: NULL

where u: is a network mounted drive 
See the attached c-program for the testcase.

I tried this with the current version 1.5.21-1 and also with the 20060910
snapshot. Both show the described problem.

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/