Fix upgrade failure when a file has been deleted from the working tree

This commit is contained in:
Joey Hess 2020-03-09 16:59:18 -04:00
parent 53f6de1fdb
commit 4ce518998a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 21 additions and 1 deletions

View file

@ -101,7 +101,7 @@ populateKeysDb = do
(l, cleanup) <- inRepo $ LsFiles.inodeCaches [top]
forM_ l $ \case
(_f, Nothing) -> giveup "Unable to parse git ls-files --debug output while upgrading git-annex sqlite databases."
(f, Just ic) -> unlessM (liftIO $ isSymbolicLink <$> getSymbolicLinkStatus f) $ do
(f, Just ic) -> unlessM (liftIO $ catchBoolIO $ isSymbolicLink <$> getSymbolicLinkStatus f) $ do
catKeyFile (toRawFilePath f) >>= \case
Nothing -> noop
Just k -> do