On 09/10/2009 07:38, Salvatore Insalaco wrote:
On Fri, Oct 9, 2009 at 1:21 AM, Jason Dagit<[email protected]>  wrote:
Now, I think we can introduce POSIX file semantics on win32.  Just check out
the articles I found.  Particularly the second one.

I really like this stuff!
I'm going to take a look to it tomorrow, maybe we can fix this
bug-inducing behavior once and forever.

Petr, If we manage to do it with win32 I think this is a much better
solution than moving files around, as it is a very expensive operation
in Windows when you do it between different partitions.

Yes, using FILE_SHARE_DELETE sounds like a good plan.  Be careful though:

http://blogs.msdn.com/oldnewthing/archive/2004/06/07/150047.aspx

if you delete the file, even though the DeleteFile succeeds, it still exists in the directory until the last HANDLE is closed. So an attempt to create a file with the same name will still fail. If you are deleting a file in order to create a new one with the same name, then you better call MoveFile() before DeleteFile().

Cheers,
        Simon

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to