fix reading of transfer info files with a bytesComplete value

This commit is contained in:
Joey Hess 2012-09-20 16:40:01 -04:00
parent a6504e4192
commit 06ed6ceac4

View file

@ -239,8 +239,8 @@ readTransferInfo mpid s = TransferInfo
<*> pure (if null filename then Nothing else Just filename)
<*> pure False
where
(bits, filebits) = splitAt 1 $ lines s
filename = join "\n" filebits
(firstline, filename) = separate (== '\n') s
bits = split " " firstline
numbits = length bits
time = if numbits > 0
then Just <$> parsePOSIXTime (bits !! 0)