Revert "Clean up direct mode cache and mapping info when dropping keys."
This reverts commit 57780cb3a4
.
This was buggy, it caused the direct mode cache to be lost when dropping
keys, so when the file is gotten back, it's stored in indirect mode.
Note to self: Do not attempt bug fixes at 6 am!
This commit is contained in:
parent
80fa144d79
commit
5a8fb26d0a
4 changed files with 11 additions and 14 deletions
|
@ -15,6 +15,7 @@ module Annex.Content.Direct (
|
|||
updateInodeCache,
|
||||
writeInodeCache,
|
||||
compareInodeCache,
|
||||
removeInodeCache,
|
||||
toInodeCache,
|
||||
) where
|
||||
|
||||
|
@ -119,5 +120,11 @@ writeInodeCache key cache = withInodeCacheFile key $ \f -> do
|
|||
createContentDir f
|
||||
liftIO $ writeFile f $ showInodeCache cache
|
||||
|
||||
{- Removes an inode cache. -}
|
||||
removeInodeCache :: Key -> Annex ()
|
||||
removeInodeCache key = withInodeCacheFile key $ \f -> do
|
||||
createContentDir f -- also thaws directory
|
||||
liftIO $ nukeFile f
|
||||
|
||||
withInodeCacheFile :: Key -> (FilePath -> Annex a) -> Annex a
|
||||
withInodeCacheFile key a = a =<< inRepo (gitAnnexInodeCache key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue