summaryrefslogtreecommitdiff
path: root/Command/Fsck.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Fsck.hs')
-rw-r--r--Command/Fsck.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index 073652d2c..8d6f03d76 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -38,7 +38,7 @@ perform key file backend numcopies = check
[ verifyLocationLog key file
, checkKeySize key
, checkKeyNumCopies key file numcopies
- , (Types.Backend.fsckKey backend) key
+ , checkBackend backend key
]
{- To fsck a bare repository, fsck each key in the location log. -}
@@ -65,7 +65,7 @@ performBare :: Key -> Backend Annex -> CommandPerform
performBare key backend = check
[ verifyLocationLog key (show key)
, checkKeySize key
- , (Types.Backend.fsckKey backend) key
+ , checkBackend backend key
]
check :: [Annex Bool] -> CommandPerform
@@ -134,6 +134,9 @@ checkKeySize key = do
return False
+checkBackend :: Backend Annex -> Key -> Annex Bool
+checkBackend backend key = (Types.Backend.fsckKey backend) key
+
checkKeyNumCopies :: Key -> FilePath -> Maybe Int -> Annex Bool
checkKeyNumCopies key file numcopies = do
needed <- getNumCopies numcopies