convert getFileSize to RawFilePath
Lots of nice wins from this in avoiding unncessary work, and I think nothing got slower. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
This commit is contained in:
parent
2670af9d5a
commit
9b0dde834e
34 changed files with 79 additions and 70 deletions
|
@ -207,7 +207,7 @@ shouldAnnex file indexmeta moldkey = ifM (annexGitAddToAnnex <$> Annex.getGitCon
|
|||
-- annex.largefiles now matches it, because the content is not
|
||||
-- changed.
|
||||
checkunchangedgitfile cont = case (moldkey, indexmeta) of
|
||||
(Nothing, Just (sha, sz, _)) -> liftIO (catchMaybeIO (getFileSize (fromRawFilePath file))) >>= \case
|
||||
(Nothing, Just (sha, sz, _)) -> liftIO (catchMaybeIO (getFileSize file)) >>= \case
|
||||
Just sz' | sz' == sz -> do
|
||||
-- The size is the same, so the file
|
||||
-- is not much larger than what was stored
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue