diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-30 14:59:35 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-30 15:02:29 -0400 |
commit | f88738223ee5156baac8f0fa0bde6d701f1fdd07 (patch) | |
tree | 5189044e7360e405aaef7a4efdf36322f40d12e0 | |
parent | d48ae1b8fd2d73746986bd40d22de450d647d223 (diff) |
don't crash on malformed lines in uuid.log
-rw-r--r-- | UUID.hs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |