diff options
-rw-r--r-- | Assistant/TransferrerPool.hs | 2 | ||||
-rw-r--r-- | Command/TransferKeys.hs | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Assistant/TransferrerPool.hs b/Assistant/TransferrerPool.hs index 69af93773..68ec743f8 100644 --- a/Assistant/TransferrerPool.hs +++ b/Assistant/TransferrerPool.hs @@ -62,6 +62,8 @@ mkTransferrer program = do closeFd tread myreadh <- fdToHandle myread mywriteh <- fdToHandle mywrite + fileEncoding myreadh + fileEncoding mywriteh return $ Transferrer { transferrerRead = myreadh , transferrerWrite = mywriteh diff --git a/Command/TransferKeys.hs b/Command/TransferKeys.hs index 93415d5f3..2114e2278 100644 --- a/Command/TransferKeys.hs +++ b/Command/TransferKeys.hs @@ -66,7 +66,12 @@ runRequests -> Handle -> (TransferRequest -> Annex Bool) -> Annex () -runRequests readh writeh a = go =<< readrequests +runRequests readh writeh a = do + liftIO $ do + hSetBuffering readh NoBuffering + fileEncoding readh + fileEncoding writeh + go =<< readrequests where go (d:u:k:f:rest) = do case (deserialize d, deserialize u, deserialize k, deserialize f) of @@ -93,6 +98,7 @@ sendRequest t f h = do , serialize (transferUUID t) , serialize (transferKey t) , serialize f + , "" -- adds a trailing null ] hFlush h |