open file for append, not write, so resuming works
WriteMode zeros any existing content, so the seek filled with zeros, and verification failed after download.
This commit is contained in:
parent
b55399e3ac
commit
99c36f318c
1 changed files with 1 additions and 1 deletions
|
@ -120,7 +120,7 @@ runLocal runmode runner a = case a of
|
||||||
-- a client.
|
-- a client.
|
||||||
Client -> ta
|
Client -> ta
|
||||||
storefile dest (Offset o) (Len l) b = liftIO $ do
|
storefile dest (Offset o) (Len l) b = liftIO $ do
|
||||||
withBinaryFile dest WriteMode $ \h -> do
|
withBinaryFile dest AppendMode $ \h -> do
|
||||||
when (o /= 0) $
|
when (o /= 0) $
|
||||||
hSeek h AbsoluteSeek o
|
hSeek h AbsoluteSeek o
|
||||||
L.hPut h b
|
L.hPut h b
|
||||||
|
|
Loading…
Add table
Reference in a new issue