diff options
author | Joey Hess <joey@kitenet.net> | 2011-05-15 02:02:46 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-05-15 02:02:46 -0400 |
commit | 56bc3e95cabb85e5f23e30b453f90438c33efbb8 (patch) | |
tree | c13ac69cfc2b5ba9582aa5c1ebd427bc0d337b16 /Command/Fsck.hs | |
parent | b400984ddf9aeb24c3d67e87cfeb29470618636c (diff) |
refactor some boilerplate
Diffstat (limited to 'Command/Fsck.hs')
-rw-r--r-- | Command/Fsck.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs index 20ef2c808..adfd702de 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -31,7 +31,7 @@ seek = [withAttrFilesInGit "annex.numcopies" start] start :: CommandStartAttrFile start (file, attr) = notBareRepo $ isAnnexed file $ \(key, backend) -> do showStart "fsck" file - return $ Just $ perform key file backend numcopies + next $ perform key file backend numcopies where numcopies = readMaybe attr :: Maybe Int @@ -42,8 +42,8 @@ perform key file backend numcopies = do locationlogok <- verifyLocationLog key file backendok <- Backend.fsckKey backend key (Just file) numcopies if locationlogok && backendok - then return $ Just $ return True - else return Nothing + then next $ return True + else stop {- Checks that the location log reflects the current status of the key, in this repository only. -} |