diff options
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Content/Direct.hs | 4 | ||||
-rw-r--r-- | Annex/Direct.hs | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index 2d271eee4..b249e0557 100644 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -175,9 +175,9 @@ sameInodeCache file old = go =<< withTSDelta (liftIO . genInodeCache file) {- Checks if a FileStatus matches the recorded InodeCache of a file. -} sameFileStatus :: Key -> FileStatus -> Annex Bool -sameFileStatus key status = withTSDelta $ \delta -> do +sameFileStatus key status = do old <- recordedInodeCache key - let curr = toInodeCache delta status + curr <- withTSDelta $ \delta -> liftIO $ toInodeCache delta status case (old, curr) of (_, Just c) -> elemInodeCaches c old ([], Nothing) -> return True diff --git a/Annex/Direct.hs b/Annex/Direct.hs index e3dbfb6d8..5442113af 100644 --- a/Annex/Direct.hs +++ b/Annex/Direct.hs @@ -56,8 +56,9 @@ stageDirect = do go (file, Just sha, Just mode) = withTSDelta $ \delta -> do shakey <- catKey sha mode mstat <- liftIO $ catchMaybeIO $ getSymbolicLinkStatus file + mcache <- liftIO $ maybe (pure Nothing) (toInodeCache delta) mstat filekey <- isAnnexLink file - case (shakey, filekey, mstat, toInodeCache delta =<< mstat) of + case (shakey, filekey, mstat, mcache) of (_, Just key, _, _) | shakey == filekey -> noop {- A changed symlink. -} |