Message93973
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. |
|
Date |
User |
Action |
Args |
2009-10-14 11:22:51 | sandberg | set | recipients:
+ sandberg, terry.reedy, ocean-city |
2009-10-14 11:22:51 | sandberg | set | messageid: <1255519371.87.0.392815563482.issue5985@psf.upfronthosting.co.za> |
2009-10-14 11:22:50 | sandberg | link | issue5985 messages |
2009-10-14 11:22:50 | sandberg | create | |
|