thaw content directory in direct mode too

A content directory can be frozen in direct mode. One way this can happen
is if the content is transferred before direct mode has a mapping for it,
so it's stored in the content directory.

So, we need to thaw the content directory before doing things with it.
This commit is contained in:
Joey Hess 2013-04-30 19:33:43 -04:00
parent 1111552efd
commit 0807211a67
3 changed files with 6 additions and 0 deletions

View file

@ -242,6 +242,7 @@ moveAnnex key src = withObjectLoc key storeobject storedirect
storedirect' [] = storeobject =<< calcRepo (gitAnnexLocation key)
storedirect' (dest:fs) = do
thawContentDir =<< calcRepo (gitAnnexLocation key)
updateInodeCache key src
thawContent src
replaceFile dest $ liftIO . moveFile src
@ -358,6 +359,7 @@ removeAnnex key = withObjectLoc key remove removedirect
removeInodeCache key
cleanObjectLoc key
removedirect fs = do
thawContentDir =<< calcRepo (gitAnnexLocation key)
cache <- recordedInodeCache key
removeInodeCache key
mapM_ (resetfile cache) fs