summaryrefslogtreecommitdiff
path: root/Annex/Content/Direct.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Content/Direct.hs')
-rw-r--r--Annex/Content/Direct.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs
index 164cb64a4..bbf6e310d 100644
--- a/Annex/Content/Direct.hs
+++ b/Annex/Content/Direct.hs
@@ -14,6 +14,7 @@ module Annex.Content.Direct (
updateInodeCache,
writeInodeCache,
compareInodeCaches,
+ compareInodeCachesWith,
sameInodeCache,
sameFileStatus,
removeInodeCache,
@@ -147,12 +148,15 @@ sameFileStatus key status = do
{- If the inodes have changed, only the size and mtime are compared. -}
compareInodeCaches :: InodeCache -> InodeCache -> Annex Bool
compareInodeCaches x y
- | x `compareStrong` y = return True
+ | compareStrong x y = return True
| otherwise = ifM inodesChanged
( return $ compareWeak x y
, return False
)
+compareInodeCachesWith :: Annex InodeComparisonType
+compareInodeCachesWith = ifM inodesChanged ( return Weakly, return Strongly )
+
{- Some filesystems get new inodes each time they are mounted.
- In order to work on such a filesystem, a sentinal file is used to detect
- when the inodes have changed.