fix reading of empty filename from transfer info file
This commit is contained in:
parent
760e028dca
commit
8f6c2e6081
1 changed files with 2 additions and 4 deletions
|
@ -165,10 +165,8 @@ readTransferInfo pid s =
|
||||||
<*> pure (Just pid)
|
<*> pure (Just pid)
|
||||||
<*> pure Nothing
|
<*> pure Nothing
|
||||||
<*> pure Nothing
|
<*> pure Nothing
|
||||||
<*> pure filename
|
<*> pure (if null filename then Nothing else Just filename)
|
||||||
_ -> Nothing
|
_ -> Nothing
|
||||||
where
|
where
|
||||||
(bits, filebits) = splitAt 1 $ lines s
|
(bits, filebits) = splitAt 1 $ lines s
|
||||||
filename
|
filename = join "\n" filebits
|
||||||
| null filebits = Nothing
|
|
||||||
| otherwise = Just $ join "\n" filebits
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue