don't crash on malformed lines in uuid.log
This commit is contained in:
parent
d48ae1b8fd
commit
f88738223e
1 changed files with 5 additions and 1 deletions
6
UUID.hs
6
UUID.hs
|
@ -100,4 +100,8 @@ uuidMap = do
|
|||
s <- Branch.get uuidLog
|
||||
return $ M.fromList $ map pair $ lines s
|
||||
where
|
||||
pair l = (head $ words l, unwords $ drop 1 $ words l)
|
||||
pair l
|
||||
| null ws = ("", "")
|
||||
| otherwise = (head ws, unwords $ drop 1 ws)
|
||||
where
|
||||
ws = words l
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue