remove unused parameter
authorJoey Hess <joeyh@joeyh.name>
Thu, 29 Jul 2021 17:12:11 +0000 (13:12 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 29 Jul 2021 17:12:11 +0000 (13:12 -0400)
Command/Fsck.hs

index 0d0cf11e05f88909d9c022f3c4e4335c0920c5ae..04b00d73d7f79bf5cfa0b2540f89f517a66c6838 100644 (file)
@@ -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