summaryrefslogtreecommitdiff
path: root/Command/Fsck.hs
diff options
context:
space:
mode:
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