summaryrefslogtreecommitdiff
path: root/Remote/Helper/Special.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-11-16 21:00:54 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-11-16 21:00:54 -0400
commit89e8441c62b985a6bcf37024fc051e99fbce8e37 (patch)
treeef9d04b7f73633a27c187b472efc5142fde62130 /Remote/Helper/Special.hs
parentd77b7936adc49a98172a16a3fea89fb2ad9fd642 (diff)
Display progress meter in -J mode when downloading from the web.
Including in addurl, and get --from web, but also in S3 and External special remotes when a web url is known for content in those remotes.
Diffstat (limited to 'Remote/Helper/Special.hs')
-rw-r--r--Remote/Helper/Special.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Remote/Helper/Special.hs b/Remote/Helper/Special.hs
index 7faf7a8a1..d586d8c0a 100644
--- a/Remote/Helper/Special.hs
+++ b/Remote/Helper/Special.hs
@@ -155,8 +155,8 @@ specialRemote' :: SpecialRemoteCfg -> RemoteModifier
specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckpresent baser = encr
where
encr = baser
- { storeKey = \k f p -> cip >>= storeKeyGen k f p
- , retrieveKeyFile = \k f d p -> cip >>= unVerified . retrieveKeyFileGen k f d p
+ { storeKey = \k _f p -> cip >>= storeKeyGen k p
+ , retrieveKeyFile = \k _f d p -> cip >>= unVerified . retrieveKeyFileGen k d p
, retrieveKeyFileCheap = \k f d -> cip >>= maybe
(retrieveKeyFileCheap baser k f d)
-- retrieval of encrypted keys is never cheap
@@ -183,12 +183,12 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp
safely a = catchNonAsync a (\e -> warning (show e) >> return False)
-- chunk, then encrypt, then feed to the storer
- storeKeyGen k f p enc = safely $ preparestorer k $ safely . go
+ storeKeyGen k p enc = safely $ preparestorer k $ safely . go
where
go (Just storer) = preparecheckpresent k $ safely . go' storer
go Nothing = return False
go' storer (Just checker) = sendAnnex k rollback $ \src ->
- displayprogress p k f $ \p' ->
+ displayprogress p k $ \p' ->
storeChunks (uuid baser) chunkconfig k src p'
(storechunk enc storer)
checker
@@ -204,10 +204,10 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp
storer (enck k) (ByteContent encb) p
-- call retriever to get chunks; decrypt them; stream to dest file
- retrieveKeyFileGen k f dest p enc =
+ retrieveKeyFileGen k dest p enc =
safely $ prepareretriever k $ safely . go
where
- go (Just retriever) = displayprogress p k f $ \p' ->
+ go (Just retriever) = displayprogress p k $ \p' ->
retrieveChunks retriever (uuid baser) chunkconfig
enck k dest p' (sink dest enc)
go Nothing = return False
@@ -227,8 +227,8 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp
chunkconfig = chunkConfig cfg
- displayprogress p k f a
- | displayProgress cfg = metered (Just p) k f a
+ displayprogress p k a
+ | displayProgress cfg = metered (Just p) k a
| otherwise = a p
{- Sink callback for retrieveChunks. Stores the file content into the