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 /Logs/Transfer.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 'Logs/Transfer.hs')
-rw-r--r-- | Logs/Transfer.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs index 65a4e3796..28f7b0a26 100644 --- a/Logs/Transfer.hs +++ b/Logs/Transfer.hs @@ -220,8 +220,7 @@ parseTransferFile file bits = splitDirectories file writeTransferInfoFile :: TransferInfo -> FilePath -> IO () -writeTransferInfoFile info tfile = writeFileAnyEncoding tfile $ - writeTransferInfo info +writeTransferInfoFile info tfile = writeFile tfile $ writeTransferInfo info {- File format is a header line containing the startedTime and any - bytesComplete value. Followed by a newline and the associatedFile. @@ -243,7 +242,7 @@ writeTransferInfo info = unlines readTransferInfoFile :: Maybe PID -> FilePath -> IO (Maybe TransferInfo) readTransferInfoFile mpid tfile = catchDefaultIO Nothing $ - readTransferInfo mpid <$> readFileStrictAnyEncoding tfile + readTransferInfo mpid <$> readFileStrict tfile readTransferInfo :: Maybe PID -> String -> Maybe TransferInfo readTransferInfo mpid s = TransferInfo |