diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-21 00:34:48 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-21 00:51:42 -0400 |
commit | b3431cb37b5b7aff11ce9a25102bf5446b59a18c (patch) | |
tree | b447b0055ab5dc30951f6fcf443eded468781e03 /Logs | |
parent | 10298ba18f004ccf528ebc3ea4ec8475899fb095 (diff) |
!! removal
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/Transfer.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs index 3b68eeeb7..e9922422f 100644 --- a/Logs/Transfer.hs +++ b/Logs/Transfer.hs @@ -296,11 +296,11 @@ readTransferInfo mpid s = TransferInfo bits = split " " firstline numbits = length bits time = if numbits > 0 - then Just <$> parsePOSIXTime (bits !! 0) - else pure Nothing + then Just <$> parsePOSIXTime =<< headMaybe bits + else pure Nothing -- not failure bytes = if numbits > 1 - then Just <$> readish (bits !! 1) - else pure Nothing + then Just <$> readish =<< headMaybe (drop 1 bits) + else pure Nothing -- not failure parsePOSIXTime :: String -> Maybe POSIXTime parsePOSIXTime s = utcTimeToPOSIXSeconds |