fsck: Fix recent reversion that made it say it was checksumming files whose content is not present
Did not track down the commit that caused the problem, but git-annex version 10.20240431 didn't behave that way.
This commit is contained in:
parent
4007d7234b
commit
05684bdd6c
2 changed files with 15 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue