This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sandberg
Recipients ocean-city, sandberg, terry.reedy
Date 2009-10-14.11:22:50
SpamBayes Score 3.5145633e-06
Marked as misclassified No
Message-id <1255519371.87.0.392815563482.issue5985@psf.upfronthosting.co.za>
In-reply-to
Content
An alternative solution which I would have considered, is to extend
stat/fstat on Windows to set st_dev and st_ino to sensible values (based
on dwVolumeSerialNumber and nFileIndexLow/High), and then use the POSIX
implementations of samefile/sameopenfile.

There may be one potential problem with this solution though: It would
require stat to perform a CreateFile in addition to GetFileAttributesEx,
and I don't know if there are situations where one is allowed to call
the latter but not the former on a file. There would be no such problems
with fstat, though.

In your patch, I think the dwShareMode parameter to CreateFile* should
be changed to FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE so
make the operation less intrusive.
History
Date User Action Args
2009-10-14 11:22:51sandbergsetrecipients: + sandberg, terry.reedy, ocean-city
2009-10-14 11:22:51sandbergsetmessageid: <1255519371.87.0.392815563482.issue5985@psf.upfronthosting.co.za>
2009-10-14 11:22:50sandberglinkissue5985 messages
2009-10-14 11:22:50sandbergcreate