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
This commit is contained in:
Joey Hess 2012-12-19 14:16:58 -04:00
parent f3833dfe35
commit 7da2e27293
2 changed files with 5 additions and 1 deletions

View file

@ -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