
13 Sep
2009
13 Sep
'09
7:53 a.m.
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. Duncan