thread through original key to retrieveEnctypted

Allows showing progress bar for this last case of the directory special
remote.
This commit is contained in:
Joey Hess 2012-03-04 03:36:39 -04:00
parent 4638314001
commit 7ba79cfb8c
6 changed files with 17 additions and 16 deletions

View file

@ -114,8 +114,8 @@ retrieve h k f = runHook h "retrieve" k (Just f) $ return True
retrieveCheap :: String -> Key -> FilePath -> Annex Bool
retrieveCheap _ _ _ = return False
retrieveEncrypted :: String -> (Cipher, Key) -> FilePath -> Annex Bool
retrieveEncrypted h (cipher, enck) f = withTmp enck $ \tmp ->
retrieveEncrypted :: String -> (Cipher, Key) -> Key -> FilePath -> Annex Bool
retrieveEncrypted h (cipher, enck) _ f = withTmp enck $ \tmp ->
runHook h "retrieve" enck (Just tmp) $ liftIO $ catchBoolIO $ do
withDecryptedContent cipher (L.readFile tmp) $ L.writeFile f
return True