[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Windows XP "Access denied" svn_io_rename

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-10-27 22:49:11 CET

James Van Artsdalen wrote:

>>Date: Mon, 27 Oct 2003 18:53:25 +0100
>>From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= <brane@xbc.nu>
>>
>>
>>>The issue isn't atomicity but rather the Win32 API guarantee that a
>>>file cannot be renamed or deleted while open.
>>>
>>>
>>Win32 makes no such guarantee. A file _can_ be renamed or deleted while
>>open, it just won't disappear from the directory listing until the last
>>handle is closed. It would be amazingly simple to implement this if only
>>Win32 offered a rename-through-handle function...
>>
>>
>
>I tried this using Win32 calls, and if one process has a file open
>a different process can neither rename nor delete it.
>The operation fails and is not deferred (under XP anyway).
>
>
FILE_SHARE_DELETE is your friend. By the way, I'm suggesting that the
_same_ proces opens and then renames the file before closing it. Should
be doable with Win32 calls, at least on NT-class systems. Win9x probably
wouldn't work.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Oct 27 22:52:44 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.