make filename available to fsck messages

This commit is contained in:
Joey Hess 2011-01-26 20:37:46 -04:00
parent c30d38e108
commit e1d213d6e3
5 changed files with 20 additions and 17 deletions

View file

@ -24,13 +24,13 @@ seek = [withAttrFilesInGit "annex.numcopies" start]
start :: CommandStartAttrFile
start (file, attr) = isAnnexed file $ \(key, backend) -> do
showStart "fsck" file
return $ Just $ perform key backend numcopies
return $ Just $ perform key file backend numcopies
where
numcopies = readMaybe attr :: Maybe Int
perform :: Key -> Backend Annex -> Maybe Int -> CommandPerform
perform key backend numcopies = do
success <- Backend.fsckKey backend key numcopies
perform :: Key -> FilePath -> Backend Annex -> Maybe Int -> CommandPerform
perform key file backend numcopies = do
success <- Backend.fsckKey backend key (Just file) numcopies
if success
then return $ Just $ return True
else return Nothing