diff --git a/CHANGELOG b/CHANGELOG index 754da07f08..494e57ab85 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ git-annex (10.20240431) UNRELEASED; urgency=medium + * fsck: Fix recent reversion that made it say it was checksumming files + whose content is not present. * Typo fixes. Thanks, Yaroslav Halchenko diff --git a/Command/Fsck.hs b/Command/Fsck.hs index 3e3de1ea86..de5859cd6c 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -504,16 +504,19 @@ checkKeyUpgrade _ _ _ (AssociatedFile Nothing) = checkBackend :: Key -> KeyStatus -> AssociatedFile -> Annex Bool checkBackend key keystatus afile = do content <- calcRepo (gitAnnexLocation key) - ifM (pure (isKeyUnlockedThin keystatus) <&&> (not <$> isUnmodified key content)) - ( nocheck - , do - mic <- withTSDelta (liftIO . genInodeCache content) - ifM (checkBackendOr badContent key content ai) - ( do - checkInodeCache key content mic ai - return True - , return False - ) + ifM (liftIO $ R.doesPathExist content) + ( ifM (pure (isKeyUnlockedThin keystatus) <&&> (not <$> isUnmodified key content)) + ( nocheck + , do + mic <- withTSDelta (liftIO . genInodeCache content) + ifM (checkBackendOr badContent key content ai) + ( do + checkInodeCache key content mic ai + return True + , return False + ) + ) + , nocheck ) where nocheck = return True