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 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.
History
Date User Action Args
2010-04-11 19:12:25loewissetrecipients: + loewis, jafo, jaraco, techtonik, tim.golden, r.david.murray, brian.curtin, asvetlov, flox
2010-04-11 19:12:23loewislinkissue7443 messages
2010-04-11 19:12:23loewiscreate