summaryrefslogtreecommitdiff
path: root/Annex/Content
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-03-12 16:41:54 -0400
committerJoey Hess <joey@kitenet.net>2013-03-12 16:41:54 -0400
commitf7de51e8b62e9121318eac70c1ea40fd89501566 (patch)
tree137b3e9a35dde4c3b5aec3b61b013cb022610b02 /Annex/Content
parente63a983cf1b44764031249ffd1611c0a50b0cd05 (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')
-rw-r--r--Annex/Content/Direct.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs
index bbf6e310d4..523e15f18f 100644
--- a/Annex/Content/Direct.hs
+++ b/Annex/Content/Direct.hs
@@ -150,8 +150,12 @@ compareInodeCaches :: InodeCache -> InodeCache -> Annex Bool
compareInodeCaches x y
| compareStrong x y = return True
| otherwise = ifM inodesChanged
- ( return $ compareWeak x y
- , return False
+ ( do
+ liftIO $ print ("compareInodeCaches weak")
+ return $ compareWeak x y
+ , do
+ liftIO $ print ("compareInodeCaches no inode change but cache not match")
+ return False
)
compareInodeCachesWith :: Annex InodeComparisonType
@@ -171,9 +175,11 @@ inodesChanged = maybe calc return =<< Annex.getState Annex.inodeschanged
scache <- liftIO . genInodeCache
=<< fromRepo gitAnnexInodeSentinal
scached <- readInodeSentinalFile
+ liftIO $ print (scache, scached)
let changed = case (scache, scached) of
(Just c1, Just c2) -> not $ compareStrong c1 c2
_ -> True
+ liftIO $ print changed
Annex.changeState $ \s -> s { Annex.inodeschanged = Just changed }
return changed