summaryrefslogtreecommitdiff
path: root/Annex/Content.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-12 16:41:54 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-12 16:41:54 -0400
commit957dffd030816a067fa6ee3c93f63311ad1f009c (patch)
tree38770fb328269f1ebc45a26fc7a3f3bf88199ae6 /Annex/Content.hs
parent79a3398d4cb3837d51d4431a2bb29a7a70a8f335 (diff)
Bugfix: Fix bug in inode cache sentinal check, which broke copying to local repos if the repo being copied from had moved to a different filesystem or otherwise changed all its inodes'
Diffstat (limited to 'Annex/Content.hs')
-rw-r--r--Annex/Content.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 0439cb367..673e59b10 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -276,6 +276,10 @@ replaceFile file a = do
- In direct mode, it's possible for the file to change as it's being sent.
- If this happens, runs the rollback action and returns False. The
- rollback action should remove the data that was transferred.
+ -
+ - Note that the returned action is, in some cases, run in the Annex monad
+ - of the remote that is receiving the object, rather than the sender.
+ - So it cannot rely on Annex state, particular
-}
sendAnnex :: Key -> Annex () -> (FilePath -> Annex Bool) -> Annex Bool
sendAnnex key rollback sendobject = go =<< prepSendAnnex key
@@ -303,6 +307,7 @@ prepSendAnnex key = withObjectLoc key indirect direct
direct [] = return Nothing
direct (f:fs) = do
cache <- recordedInodeCache key
+ liftIO $ print ("prepSendAnnex pre cache", cache)
-- check that we have a good file
ifM (sameInodeCache f cache)
( return $ Just (f, sameInodeCache f cache)