This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: unlink


On Mon, Mar 10, 2003 at 10:36:26AM -0500, Pierre A. Humblet wrote:
>Chris,
>
>It's a great idea to use FILE_FLAG_DELETE_ON_CLOSE for unlink,
>but a few bells rang when I read the code.

AFAIK, I didn't add anything here.  I just changed the order.  unlink
has always used FILE_FLAG_DELETE_ON_CLOSE.

>2) Why is wincap.has_delete_on_close needed?
>
>All Windows versions have delete_on_close capability. This is a snippet
>on WinME with a file on a shared directory mounted on Win98.

It doesn't work quite right on Windows 98.  I tested it extensively a
while ago and it seemed unreliable.  Maybe it is ok in the current incarnation.
I guess I could remove that test and see if anyone hollers.

>3) I don't understand why there are so many SetFileAttributes after CreateFile
>   succeeds. If the file will be deleted, its attributes are don't care.

Think 'hard links'.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]