On 7/31/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > >> Is this also a restriction on CYGWIN? I don't know > >> anything about CYGWIN but I could imagine that they allow unlink() to > >> succeed when there's still a file descriptor referencing it, and that > >> they will delete the file when you close it. > > > > Exactly. That is exactly what they do. > > Not exactly; it's not possible with Win32 to do that. > > What they do instead is > 1. try to delete the file. If that fails for sharing > violation, try 2. > 2. move the file to the recycle bin, and set the > "delete" disposition flag on the file, this will > cause it to be removed from the recycle bin when > the last handle is closed.
I don't understand how that approach would cause the permission error when trying to create the same file later again. Unless (a) I don't understand the phrase "move it to the recycle bin" (is this a rename() call?), or (b) you're describing the new version that was submitted 2 days ago (but not yet released). -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
