[Haskell-cafe] Re: Darcs and NFS Resolution
duncan.coutts at worc.ox.ac.uk
Sun Sep 13 07:53:25 EDT 2009
On Sat, 2009-09-12 at 23:24 +0100, Ganesh Sittampalam wrote:
> Darcs already has a WIN32-specific workaround for renaming going wrong
> when the new file exists, and my initial guess was that was what was going
> wrong here.
BTW, this is not necessary afaik. Rename over an existing file works
just fine on Windows. Cabal uses it in its implementation of
writeFileAtomic and that certainly works for writing existing files,
indeed that is its raison d'être.
The only time it goes wrong is if another process has the target file
open, and in that case removing the target will fail too.
More information about the Haskell-Cafe