Message102869
| Author |
loewis |
| Recipients |
asvetlov, brian.curtin, flox, jafo, jaraco, loewis, r.david.murray, techtonik, tim.golden |
| Date |
2010年04月11日.19:12:23 |
| SpamBayes Score |
3.1495663e-06 |
| Marked as misclassified |
No |
| Message-id |
<4BC21F16.8050902@v.loewis.de> |
| In-reply-to |
<4BC216E5.7020205@timgolden.me.uk> |
| Content |
> I'm afraid that the problem doesn't lie in the unlink: DeleteFile
> succeeds. The problem is that the file is only marked for delete
> until such time as the last SHARE_DELETE handle on it is closed.
Then we shouldn't use DeleteFile in the first place to delete the file,
but instead CreateFile, with DELETE access (and FILE_SHARE_DELETE
sharing). If that fails, we need to move the file to the bin
(see unlink_nt for details).
> Making os.unlink on Windows more robust may be a good
> idea, but it's not going to help this issue. See my test-case.py
> on an earlier message for reproduction:
It certainly will help this case also. It would detect that the file is
still open, and move it into the trash bin. |
|