summaryrefslogtreecommitdiff
path: root/Annex/Content
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-01-20 19:35:50 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-01-20 19:35:50 -0400
commitcb50de905ca5b63cbb972cf587f74ff563b2573b (patch)
tree6ecedc8ac397a6912133cca6c4fc8e023dc84807 /Annex/Content
parent745525e80bb6915f3eb63554de9b735b75991f7d (diff)
on second thought, InodeCache should use getFileSize
This is necessary for interop between inode caches created on unix and windows. Which is more important than supporting inodecaches for large keys with the wrong size, which are broken anyway. There should be no slowdown from this change, except on Windows.
Diffstat (limited to 'Annex/Content')
-rw-r--r--Annex/Content/Direct.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs
index c09a08f0d..4392b5198 100644
--- a/Annex/Content/Direct.hs
+++ b/Annex/Content/Direct.hs
@@ -174,10 +174,10 @@ sameInodeCache file old = go =<< withTSDelta (liftIO . genInodeCache file)
go (Just curr) = elemInodeCaches curr old
{- Checks if a FileStatus matches the recorded InodeCache of a file. -}
-sameFileStatus :: Key -> FileStatus -> Annex Bool
-sameFileStatus key status = do
+sameFileStatus :: Key -> FilePath -> FileStatus -> Annex Bool
+sameFileStatus key f status = do
old <- recordedInodeCache key
- curr <- withTSDelta $ \delta -> liftIO $ toInodeCache delta status
+ curr <- withTSDelta $ \delta -> liftIO $ toInodeCache delta f status
case (old, curr) of
(_, Just c) -> elemInodeCaches c old
([], Nothing) -> return True