split out Utility.InodeCache
This commit is contained in:
parent
47477b2807
commit
a52f8f382b
8 changed files with 95 additions and 88 deletions
|
@ -95,7 +95,7 @@ ingest (Just source) = do
|
|||
( do
|
||||
mstat <- liftIO $ catchMaybeIO $ getSymbolicLinkStatus $ keyFilename source
|
||||
k <- genKey source backend
|
||||
godirect k (toCache =<< mstat)
|
||||
godirect k (toInodeCache =<< mstat)
|
||||
, go =<< genKey source backend
|
||||
)
|
||||
where
|
||||
|
@ -107,9 +107,9 @@ ingest (Just source) = do
|
|||
go Nothing = failure
|
||||
|
||||
godirect (Just (key, _)) (Just cache) =
|
||||
ifM (compareCache (keyFilename source) $ Just cache)
|
||||
ifM (liftIO $ compareInodeCache (keyFilename source) $ Just cache)
|
||||
( do
|
||||
writeCache key cache
|
||||
writeInodeCache key cache
|
||||
void $ addAssociatedFile key $ keyFilename source
|
||||
unlessM crippledFileSystem $
|
||||
liftIO $ allowWrite $ keyFilename source
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue