make metered more generic

Allow it to be used when the Key is not known.
This commit is contained in:
Joey Hess 2019-06-25 12:30:18 -04:00
parent 8355dba5cc
commit 26c54d6ea3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 39 additions and 22 deletions

View file

@ -253,7 +253,8 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp
chunkconfig = chunkConfig cfg
displayprogress p k srcfile a
| displayProgress cfg = metered (Just p) k (return srcfile) (const a)
| displayProgress cfg =
metered (Just p) (KeySizer k (return srcfile)) (const a)
| otherwise = a p
{- Sink callback for retrieveChunks. Stores the file content into the