summaryrefslogtreecommitdiff
path: root/Annex/Direct.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Direct.hs')
-rw-r--r--Annex/Direct.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs
index c6f12a7b8..1bebb2cb7 100644
--- a/Annex/Direct.hs
+++ b/Annex/Direct.hs
@@ -51,8 +51,10 @@ stageDirect = do
- modified, so compare the cache to see if
- it really was. -}
oldcache <- recordedInodeCache key
- when (oldcache /= Just cache) $
- modifiedannexed file key cache
+ case oldcache of
+ Nothing -> modifiedannexed file key cache
+ Just c -> unlessM (compareInodeCaches c cache) $
+ modifiedannexed file key cache
(Just key, Nothing, _) -> deletedannexed file key
(Nothing, Nothing, _) -> deletegit file
(_, Just _, _) -> addgit file