----- Original Message ----- From: "Eric Blake"
On 01/07/2011 11:21 AM, Steven Hartland wrote:
What file system is this on? Someone else reported the same behavior
for "Samba share on QNX through Virtual PC." - if the problem is limited
to just a subset of (known-buggy) file systems, it would be nicer to
limit the workaround to just those file systems (and have st_size always
return 0 for directories from those systems).
FS was just NTFS, at first we thought it might be being caused by compression
being enabled on the files / directories but we confirmed the behavour
on an machine with uncompressed volumes as well.
Is there some "meta data" caching going on in cygwin or
Windows which causes this very strange behaviour?
Giving us more details about your filesystem would help us answer that
question.
Just NTFS I'm afraid nothing special.
You can see the behaviour with ls -l as well, as you would expect.
A simpler, which may help is:-
ls -l
drwxr-xr-x 1 test test 0 Oct 20 14:09 testdir
find testdir > /dev/null # lots of files
ls -l
drwxr-xr-x 1 test test 8192 Oct 20 14:09 testdir
uname -a
CYGWIN_NT-6.0-WOW64 hern4 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin