diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-24 14:46:31 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-24 14:46:31 -0400 |
commit | 3b9d9a267b7c9247d36d9b622e1b836724ca5fb0 (patch) | |
tree | 7c57f49555835e462e0f69ba133bbfdaaf215368 /Utility/MagicWormhole.hs | |
parent | 2aba1975e8192e7c60ef85118b40654b60cad027 (diff) |
Always use filesystem encoding for all file and handle reads and writes.
This is a big scary change. I have convinced myself it should be safe. I
hope!
Diffstat (limited to 'Utility/MagicWormhole.hs')
-rw-r--r-- | Utility/MagicWormhole.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Utility/MagicWormhole.hs b/Utility/MagicWormhole.hs index 9a99cba33..e217dcdca 100644 --- a/Utility/MagicWormhole.hs +++ b/Utility/MagicWormhole.hs @@ -27,7 +27,6 @@ import Utility.Process import Utility.SafeCommand import Utility.Monad import Utility.Misc -import Utility.FileSystemEncoding import Utility.Env import Utility.Path @@ -105,8 +104,7 @@ sendFile f (CodeObserver observer) ps = do -- Work around stupid stdout buffering behavior of python. -- See https://github.com/warner/magic-wormhole/issues/108 environ <- addEntry "PYTHONUNBUFFERED" "1" <$> getEnvironment - runWormHoleProcess p { env = Just environ} $ \_hin hout -> do - fileEncoding hout + runWormHoleProcess p { env = Just environ} $ \_hin hout -> findcode =<< words <$> hGetContents hout where p = wormHoleProcess (Param "send" : ps ++ [File f]) |