aboutsummaryrefslogtreecommitdiff
path: root/Remote
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 /Remote
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 'Remote')
-rw-r--r--Remote/Git.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs
index 0d7d2a988..0de453522 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -351,6 +351,10 @@ copyToRemote r key file p
where
copylocal Nothing = return False
copylocal (Just (object, checksuccess)) = do
+ -- The checksuccess action is going to be run in
+ -- the remote's Annex, but it needs access to the current
+ -- Annex monad's state.
+ checksuccessio <- Annex.withCurrentState checksuccess
let params = rsyncParams r
u <- getUUID
-- run copy from perspective of remote
@@ -360,7 +364,7 @@ copyToRemote r key file p
ensureInitialized
download u key file noRetry $
Annex.Content.saveState True `after`
- Annex.Content.getViaTmpChecked checksuccess key
+ Annex.Content.getViaTmpChecked (liftIO checksuccessio) key
(\d -> rsyncOrCopyFile params object d p)
)