darcs

Patch 60 Workaround for a System.Directory.createDirectory bug on Windows

Title Workaround for a System.Directory.createDirectory bug on Windows
Superseder Nosy List darcs-users, kirby, mornfall, simonmar
Related Issues
Status accepted Assigned To
Milestone

Created on 2009-11-14.16:24:07 by kirby, last changed 2009-11-20.12:43:54 by simonmar.

Files
File name Status Uploaded Type Edit Remove
createDirectory.dpatch kirby, 2009-11-14.16:24:07 text/x-darcs-patch
See mailing list archives for discussion on individual patches.
Messages
msg9276 (view) Author: kirby Date: 2009-11-14.16:24:07
We could remove it after ghc 6.12. Makes the init test fail.
Attachments
msg9291 (view) Author: mornfall Date: 2009-11-15.09:01:14
Applied, thanks. (I have added a comment with a link to the GHC ticket. I am not
sure this is yet fixed in 6.12, even. We can watch the ticket anyway.)
msg9431 (view) Author: simonmar Date: 2009-11-20.12:43:53
On 15/11/2009 09:01, Petr Ročkai wrote:
>
> Petr Ročkai<me@mornfall.net>  added the comment:
>
> Applied, thanks. (I have added a comment with a link to the GHC ticket. I am not
> sure this is yet fixed in 6.12, even. We can watch the ticket anyway.)

I'd be careful here.  There are various things that can give rise to 
"permission denied" errors on Windows, some of which we understand and 
some of which we don't.  That GHC ticket (#2924) is an issue we don't 
currently understand, but it may well be that the issue you have is 
something that you can fix in darcs, e.g. holding an open Handle to 
something in the directory.

Another reason to be cautious is that the workaround (performGC) looks 
very expensive.  And indeed if that is a workaround, then it indicates 
that perhaps you have a finalizer waiting to run.  Or perhaps it's just 
the case that waiting a little while avoids the problem: in which case 
doing exactly that (threadDelay) might be a better workaround.

Cheers,
	Simon
History
Date User Action Args
2009-11-14 16:24:07kirbycreate
2009-11-15 09:01:15mornfallsetnosy: + mornfall
messages: + msg9291
2009-11-15 09:01:49mornfallsetstatus: needs-review -> accepted
2009-11-20 12:43:54simonmarsetnosy: + simonmar
messages: + msg9431
title: Workaround for a System.Directory.createDirectory bug on Windows -> Workaround for a System.Directory.createDirectory bug on Windows