From 45221b79816ccc5b599039d7f80b772e4750effb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 19 Dec 2012 14:16:58 -0400 Subject: Bugfix: Fixed bug parsing transfer info files The newline after the filename was included in it. This was generally benign -- mostly these filenames are just displayed, and the newline didn't matter. But in the assistant, it caused unexpected dropping of preferred content. A characteristic of this bug is that the drop was displayed like this: drop some_file ok --- Logs/Transfer.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Logs') diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs index 0135f32dd..76412cf39 100644 --- a/Logs/Transfer.hs +++ b/Logs/Transfer.hs @@ -293,7 +293,8 @@ readTransferInfo mpid s = TransferInfo <*> pure (if null filename then Nothing else Just filename) <*> pure False where - (firstline, filename) = separate (== '\n') s + (firstline, rest) = separate (== '\n') s + (filename, _) = separate (== '\n') rest bits = split " " firstline numbits = length bits time = if numbits > 0 -- cgit v1.2.3