From 72a13d2a5fa1d28c60c4700df1300b1e5145faf8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 29 Jul 2021 13:12:11 -0400 Subject: [PATCH] remove unused parameter --- Command/Fsck.hs | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/Command/Fsck.hs b/Command/Fsck.hs index 0d0cf11e05..04b00d73d7 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -460,29 +460,18 @@ checkBackendRemote backend key remote ai localcopy = checkBackendOr :: (Key -> Annex String) -> Backend -> Key -> RawFilePath -> ActionItem -> Annex Bool checkBackendOr bad backend key file ai = - checkBackendOr' bad backend key file ai (return True) - --- The postcheck action is run after the content is verified, --- in order to detect situations where the file is changed while being --- verified. -checkBackendOr' :: (Key -> Annex String) -> Backend -> Key -> RawFilePath -> ActionItem -> Annex Bool -> Annex Bool -checkBackendOr' bad backend key file ai postcheck = case Types.Backend.verifyKeyContent backend of - Nothing -> return True Just verifier -> do ok <- verifier key file - ifM postcheck - ( do - unless ok $ do - msg <- bad key - warning $ concat - [ decodeBS' (actionItemDesc ai) - , ": Bad file content; " - , msg - ] - return ok - , return True - ) + unless ok $ do + msg <- bad key + warning $ concat + [ decodeBS' (actionItemDesc ai) + , ": Bad file content; " + , msg + ] + return ok + Nothing -> return True checkKeyNumCopies :: Key -> AssociatedFile -> NumCopies -> Annex Bool checkKeyNumCopies key afile numcopies = do