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.
This commit is contained in:
parent
467b77fd3b
commit
068aaf943b
6 changed files with 15 additions and 16 deletions
|
@ -160,8 +160,9 @@ ingest Nothing = return (Nothing, Nothing)
|
|||
ingest (Just source) = withTSDelta $ \delta -> do
|
||||
backend <- chooseBackend $ keyFilename source
|
||||
k <- genKey source backend
|
||||
ms <- liftIO $ catchMaybeIO $ getFileStatus $ contentLocation source
|
||||
mcache <- maybe (pure Nothing) (liftIO . toInodeCache delta) ms
|
||||
let src = contentLocation source
|
||||
ms <- liftIO $ catchMaybeIO $ getFileStatus src
|
||||
mcache <- maybe (pure Nothing) (liftIO . toInodeCache delta src) ms
|
||||
case (mcache, inodeCache source) of
|
||||
(_, Nothing) -> go k mcache ms
|
||||
(Just newc, Just c) | compareStrong c newc -> go k mcache ms
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue