[darcs-users] DeleteFile on Windows

Petr Rockai me at mornfall.net
Tue Oct 27 09:24:38 UTC 2009


Simon Marlow <marlowsd at gmail.com> writes:
> On 10/10/2009 09:41, Salvatore Insalaco wrote:
>> On Sat, Oct 10, 2009 at 10:26 AM, Petr Rockai<me at mornfall.net>  wrote:
>>
>> The issue is in Storage.Hashed.Index.indexFormatValid:
>>    fd<- openBinaryFile path ReadMode
>>    magic<- sequence [ hGetChar fd | _<- [1..size_magic] :: [Int] ]
>
> slightly off-topic, but... ew.  At the very least:
>
>    magic <- replicateM size_magic $ hGetChar fd
I have fixed both issues in hashed-storage HEAD (now installed on the
win-paradise buildslave as well). The code now looks like this:

    do magic <- mmapFileByteString path (Just (0, size_magic))
       return $ case BSC.unpack magic of

Yours,
   Petr.


More information about the darcs-users mailing list