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
|
@ -32,7 +32,7 @@ type WithConn a c = (ClosableConnection c -> Annex (ClosableConnection c, a)) ->
|
|||
|
||||
store :: (MeterUpdate -> ProtoRunner Bool) -> Key -> AssociatedFile -> MeterUpdate -> Annex ()
|
||||
store runner k af p = do
|
||||
let sizer = KeySizer k (fmap fst <$> prepSendAnnex k)
|
||||
let sizer = KeySizer k (fmap (toRawFilePath . fst) <$> prepSendAnnex k)
|
||||
metered (Just p) sizer $ \_ p' ->
|
||||
runner p' (P2P.put k af p') >>= \case
|
||||
Just True -> return ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue