distinguish between incremental verification failing and not being done

Sponsored-by: Dartmouth College's DANDI project
This commit is contained in:
Joey Hess 2021-08-18 13:54:40 -04:00
parent 325bfda12d
commit 88b63a43fa
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 41 additions and 37 deletions

View file

@ -366,11 +366,10 @@ retrieveChunks retriever u vc chunkconfig encryptor basek dest basep enc encc
| otherwise = Nothing
finalize (Right Nothing) = return UnVerified
finalize (Right (Just iv)) =
ifM (liftIO $ finalizeIncremental iv)
( return Verified
, return UnVerified
)
finalize (Right (Just iv)) =
liftIO (finalizeIncremental iv) >>= \case
Just True -> return Verified
_ -> return UnVerified
finalize (Left v) = return v
{- Writes retrieved file content to the provided Handle, decrypting it