update inode cache after copying content

This was also tripped by the test suite's automatic conflict resolution
test. Which also shows BTW that an unnecessary copy of content is done
sometimes when merging in direct mode. Not going to try to speed that up
now.
This commit is contained in:
Joey Hess 2013-05-20 17:11:02 -04:00
parent d88be65495
commit 0cb34f3caa

View file

@ -198,9 +198,10 @@ toDirectGen k f = do
locs <- filterM (\loc -> isNothing <$> getAnnexLinkTarget loc) =<<
(filter (/= absf) <$> addAssociatedFile k f)
case locs of
(loc:_) -> return $ Just $
(loc:_) -> return $ Just $ do
replaceFile f $
liftIO . void . copyFileExternal loc
updateInodeCache k f
_ -> return Nothing
{- Removes a direct mode file, while retaining its content in the annex