aboutsummaryrefslogtreecommitdiff
path: root/Command/Fsck.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-10-01 13:28:49 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-10-01 13:29:17 -0400
commite3969aeb3c1d8a91a31d4da31097ab5c59436774 (patch)
tree7fd39a284fa2d7ed37a3aab5edbbe5f80cce76d0 /Command/Fsck.hs
parent5be958bddc3afeabe51bd9da598682617ba4e0e7 (diff)
rename fsckKey to verifyKeyContent
No behavior changes.
Diffstat (limited to 'Command/Fsck.hs')
-rw-r--r--Command/Fsck.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index 656ceb644..f34b9b074 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -349,12 +349,15 @@ checkBackendOr :: (Key -> Annex String) -> Backend -> Key -> FilePath -> Annex B
checkBackendOr bad backend key file =
checkBackendOr' bad backend key file (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 (particularly in direct mode).
checkBackendOr' :: (Key -> Annex String) -> Backend -> Key -> FilePath -> Annex Bool -> Annex Bool
checkBackendOr' bad backend key file postcheck =
- case Types.Backend.fsckKey backend of
+ case Types.Backend.verifyKeyContent backend of
Nothing -> return True
- Just a -> do
- ok <- a key file
+ Just verifier -> do
+ ok <- verifier key file
ifM postcheck
( do
unless ok $ do