diff --git a/P2P/Annex.hs b/P2P/Annex.hs index daab74447a..1ef54de1d8 100644 --- a/P2P/Annex.hs +++ b/P2P/Annex.hs @@ -120,7 +120,7 @@ runLocal runmode runner a = case a of -- a client. Client -> ta storefile dest (Offset o) (Len l) b = liftIO $ do - withBinaryFile dest AppendMode $ \h -> do + withBinaryFile dest ReadWriteMode $ \h -> do when (o /= 0) $ hSeek h AbsoluteSeek o L.hPut h b