fsck: When a key is not previously known in the location log, record something so that reinject --known will work.

This commit is contained in:
Joey Hess 2016-05-10 13:20:45 -04:00
parent 9169234c34
commit ae65aecb0b
Failed to extract signature
3 changed files with 30 additions and 1 deletions

View file

@ -258,7 +258,14 @@ verifyLocationLog' key desc present u updatestatus = do
++ "\n** was expected to be present, " ++
"but its content is missing."
return False
_ -> return True
(False, False) -> do
-- When the location log for the key is not present,
-- create it, so that the key will be known.
when (null uuids) $
whenM (not <$> isKnownKey key) $
updatestatus InfoMissing
return True
(True, True) -> return True
where
fix s = do
showNote "fixing location log"