fsck: Check content of direct mode files (only when the inode cache thinks they are unmodified).

I wrote this earlier, but it never worked because it was looking at the
.git/annex/object content, which is not there..
This commit is contained in:
Joey Hess 2013-04-16 16:17:20 -04:00
parent 6490418a4e
commit 22afcdf2a5
4 changed files with 19 additions and 14 deletions

View file

@ -55,7 +55,7 @@ upgradableKey backend key = isNothing (Types.Key.keySize key) || backendupgradab
- be other files still pointing at that key. -}
perform :: FilePath -> Key -> Backend -> Backend -> CommandPerform
perform file oldkey oldbackend newbackend = do
ifM (Command.Fsck.checkBackend oldbackend oldkey)
ifM (Command.Fsck.checkBackend oldbackend oldkey (Just file))
( maybe stop go =<< genkey
, stop
)