From 957dffd030816a067fa6ee3c93f63311ad1f009c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 12 Mar 2013 16:41:54 -0400 Subject: 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' --- Remote/Git.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Remote/Git.hs') 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) ) -- cgit v1.2.3