Direct mode: Support filesystems like FAT which can change their inodes each time they are mounted.
This commit is contained in:
parent
0f4cc559a7
commit
624e34649f
7 changed files with 69 additions and 15 deletions
|
@ -304,8 +304,8 @@ prepSendAnnex key = withObjectLoc key indirect direct
|
|||
direct (f:fs) = do
|
||||
cache <- recordedInodeCache key
|
||||
-- check that we have a good file
|
||||
ifM (liftIO $ compareInodeCache f cache)
|
||||
( return $ Just (f, liftIO $ compareInodeCache f cache)
|
||||
ifM (sameInodeCache f cache)
|
||||
( return $ Just (f, sameInodeCache f cache)
|
||||
, direct fs
|
||||
)
|
||||
|
||||
|
@ -356,7 +356,7 @@ removeAnnex key = withObjectLoc key remove removedirect
|
|||
cache <- recordedInodeCache key
|
||||
removeInodeCache key
|
||||
mapM_ (resetfile cache) fs
|
||||
resetfile cache f = whenM (liftIO $ compareInodeCache f cache) $ do
|
||||
resetfile cache f = whenM (sameInodeCache f cache) $ do
|
||||
l <- calcGitLink f key
|
||||
top <- fromRepo Git.repoPath
|
||||
cwd <- liftIO getCurrentDirectory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue