fix reading of empty filename from transfer info file

This commit is contained in:
Joey Hess 2012-07-02 11:02:47 -04:00
parent 760e028dca
commit 8f6c2e6081

View file

@ -165,10 +165,8 @@ readTransferInfo pid s =
<*> pure (Just pid)
<*> pure Nothing
<*> pure Nothing
<*> pure filename
<*> pure (if null filename then Nothing else Just filename)
_ -> Nothing
where
(bits, filebits) = splitAt 1 $ lines s
filename
| null filebits = Nothing
| otherwise = Just $ join "\n" filebits
filename = join "\n" filebits