1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-28 22:44:51 +09:00

Darcs patch parser: Make sure we read the whole patch successfully

This commit is contained in:
fr33domlover 2018-07-10 16:00:01 +00:00
parent edaf141359
commit 01163dfe9a

View file

@ -273,7 +273,8 @@ readPatch path hash = do
li <- handle =<< readLatestInventory path latestInventoryAllP
mp <- loop pih (liPatches li) (fst <$> liPrevTag li)
for mp $ \ (pi, pch) -> do
(_pir, hunks) <- handle =<< readCompressedPatch path pch P.patch
(_pir, hunks) <-
handle =<< readCompressedPatch path pch (P.patch <* A.endOfInput)
let (an, ae) =
either error id $
A.parseOnly (author <* A.endOfInput) $ piAuthor pi