This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: stat matters
Corinna Vinschen wrote:
>
> On Tue, May 27, 2003 at 07:48:43PM -0400, Pierre A. Humblet wrote:
> > The bad news is that one old bug still isn't taken care of: "c:/." is
> > a root dir without being a prefix of "c:/".
>
> What are you refering to? I don't see that it fails:
>
> $ ls -ldsi C:/
> 327685 0 d--------- 10 ???????? ???????? 0 May 25 22:56 C:/
> $ ls -ldsi C:/.
> 327685 0 d--------- 10 ???????? ???????? 0 May 25 22:56 C:/.
That's probably because you are on NT/Win2000/XP, which doesn't use
stat_by_name. Here is the Win98 output (stock 1.3.22)
~: ls -ld c:/
drwxr-xr-x 14 pierre all 1663 May 19 13:55 c://
~: ls -ld c:/.
ls: c:/.: No such file or directory
> > 3) GetCompressedFileSize does not always report the updated size between the
> > moment where a write occurs and the moment where the buffers are flushed to
> > disk. It can underreport the value of st_blocks, but it's not clear if this
> > violates POSIX:
> >
> > blkcnt_t st_blocks number of blocks allocated for this object
> >
> > Allocated where? The blocks won't be on disk until flushed.
>
> Do you suggest to call GetCompressedFileSize() only for files having
> the COMPRESSED or SPARSE_FILE attribute set?
Actually that's a good idea. I don't know if it's really an issue and I didn't
know what to suggest, short of flushing the file, which wouldn't be that nice.
Pierre