diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-04-14 16:35:10 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-04-14 16:35:10 -0400 |
commit | efec2521cc14b3dec895066c9e7c16e740ab12ec (patch) | |
tree | b60412fe4c371871f334e33bbb5e3f52b1ba0945 /Remote/Helper | |
parent | dc367b090adec9f2fc5f37cba5e9b5d5f2decbce (diff) |
add filename to progress bar, and display ok/failed at end
This needed plumbing an AssociatedFile through retrieveKeyFileCheap.
Diffstat (limited to 'Remote/Helper')
-rw-r--r-- | Remote/Helper/Hooks.hs | 2 | ||||
-rw-r--r-- | Remote/Helper/Special.hs | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/Remote/Helper/Hooks.hs b/Remote/Helper/Hooks.hs index 3765281be..53bb370a6 100644 --- a/Remote/Helper/Hooks.hs +++ b/Remote/Helper/Hooks.hs @@ -36,7 +36,7 @@ addHooks' r starthook stophook = r' r' = r { storeKey = \k f p -> wrapper $ storeKey r k f p , retrieveKeyFile = \k f d p -> wrapper $ retrieveKeyFile r k f d p - , retrieveKeyFileCheap = \k f -> wrapper $ retrieveKeyFileCheap r k f + , retrieveKeyFileCheap = \k af f -> wrapper $ retrieveKeyFileCheap r k af f , removeKey = wrapper . removeKey r , checkPresent = wrapper . checkPresent r } diff --git a/Remote/Helper/Special.hs b/Remote/Helper/Special.hs index 696a43a7a..c11584bb8 100644 --- a/Remote/Helper/Special.hs +++ b/Remote/Helper/Special.hs @@ -157,10 +157,10 @@ specialRemote' :: SpecialRemoteCfg -> RemoteModifier specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckpresent baser = encr where encr = baser - { storeKey = \k _f p -> cip >>= storeKeyGen k p - , retrieveKeyFile = \k _f d p -> cip >>= retrieveKeyFileGen k d p - , retrieveKeyFileCheap = \k d -> cip >>= maybe - (retrieveKeyFileCheap baser k d) + { storeKey = \k f p -> cip >>= storeKeyGen k f p + , retrieveKeyFile = \k f d p -> cip >>= retrieveKeyFileGen k f d p + , retrieveKeyFileCheap = \k f d -> cip >>= maybe + (retrieveKeyFileCheap baser k f d) -- retrieval of encrypted keys is never cheap (\_ -> return False) , removeKey = \k -> cip >>= removeKeyGen k @@ -182,10 +182,10 @@ 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 p enc = safely $ preparestorer k $ safely . go + storeKeyGen k f p enc = safely $ preparestorer k $ safely . go where go (Just storer) = sendAnnex k rollback $ \src -> - displayprogress p k $ \p' -> + displayprogress p k f $ \p' -> storeChunks (uuid baser) chunkconfig k src p' (storechunk enc storer) (checkPresent baser) @@ -200,10 +200,10 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp storer (enck k) (ByteContent encb) p -- call retrieve-r to get chunks; decrypt them; stream to dest file - retrieveKeyFileGen k dest p enc = + retrieveKeyFileGen k f dest p enc = safely $ prepareretriever k $ safely . go where - go (Just retriever) = displayprogress p k $ \p' -> + go (Just retriever) = displayprogress p k f $ \p' -> retrieveChunks retriever (uuid baser) chunkconfig enck k dest p' (sink dest enc) go Nothing = return False @@ -223,8 +223,8 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp chunkconfig = chunkConfig cfg - displayprogress p k a - | displayProgress cfg = metered (Just p) k a + displayprogress p k f a + | displayProgress cfg = metered (Just p) k f a | otherwise = a p {- Sink callback for retrieveChunks. Stores the file content into the |