Comment 5 for bug 478023

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 478023] Re: os.lstat != os.fstat on Windows, possible dirstate caching issue

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin wrote:
> Okay, it *is* ST_DEV and the reason for the variation is given in the
> MSDN _fstat documentation:
>
> <http://msdn.microsoft.com/en-us/library/221w8e43(VS.71).aspx>
> "If a device, fd; otherwise 0."
>
> It's always 0 for a file, whereas for a stat of a filename it's {"A":0,
> "B":1, "C":2 ...}[driveletter]
>

>>> st = os.fstat(f.fileno())
>>> st
nt.stat_result(st_mode=33206, st_ino=5629499534396349L, st_dev=0,
st_nlink=1, st_uid=0, st_gid=0, st_size=5811L, st_atime=1257365979L,
st_mtime=1257365979L, st_ctime=1252003844L)

It is pretty clear that regardless what docs we find, python itself is
storing the value as "st_ino".

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr7NDMACgkQJdeBCYSNAAO+jgCcDBDg940YPn+6VEwl0uK0SYyr
zJoAoKJvPP57PCWxVHl/v8JrtGAPzuHx
=OWuC
-----END PGP SIGNATURE-----