summaryrefslogtreecommitdiff
path: root/Logs/Transfer.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-02 11:02:47 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-02 11:02:47 -0400
commit8f6c2e6081d8e162f34ff5406e8d564dc1b5f4a5 (patch)
treeabef35a915cba1bb2b80c11107fce8030422255a /Logs/Transfer.hs
parent760e028dca493364b2d8277447b91592b99415a3 (diff)
fix reading of empty filename from transfer info file
Diffstat (limited to 'Logs/Transfer.hs')
-rw-r--r--Logs/Transfer.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs
index dbd45f199..6bdc750f4 100644
--- a/Logs/Transfer.hs
+++ b/Logs/Transfer.hs
@@ -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