diff options
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/Transfer.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs index a10ffa7d7..b8938ee69 100644 --- a/Logs/Transfer.hs +++ b/Logs/Transfer.hs @@ -215,6 +215,14 @@ readTransferInfo mpid s = (bits, filebits) = splitAt 1 $ lines s filename = join "\n" filebits +{- Preserves the old transferTid and transferPaused values, + - which are not written to disk. -} +mergeTransferInfo :: TransferInfo -> TransferInfo -> TransferInfo +mergeTransferInfo new old = new + { transferTid = maybe (transferTid new) Just (transferTid old) + , transferPaused = transferPaused new || transferPaused old + } + parsePOSIXTime :: String -> Maybe POSIXTime parsePOSIXTime s = utcTimeToPOSIXSeconds <$> parseTime defaultTimeLocale "%s%Qs" s |