ReadWriteMode not AppendMode

AppendMode does not allow seeking..
This commit is contained in:
Joey Hess 2016-12-07 15:24:28 -04:00
parent 76b46afed1
commit db79b69aa0
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -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