clean up cruft left in log by bug

This commit is contained in:
Joey Hess 2013-11-09 14:30:26 -04:00
parent a045af36c4
commit 53ab737723
2 changed files with 9 additions and 5 deletions

View file

@ -63,6 +63,11 @@ parseLogWithUUID :: (UUID -> String -> Maybe a) -> String -> Log a
parseLogWithUUID parser = M.fromListWith best . mapMaybe parse . lines
where
parse line
-- This is a workaround for a bug that caused
-- NoUUID items to be stored in the log.
-- It can be removed at any time; is just here to clean
-- up logs where that happened temporarily.
| " " `isPrefixOf` line = Nothing
| null ws = Nothing
| otherwise = parser u (unwords info) >>= makepair
where