stream through proxy when using fileRetriever

The problem was that when the proxy requests a key be retrieved to its
own temp file, fileRetriever was retriving it to the key's temp
location, and then moving it at the end, which broke streaming.

So, plumb through the path where the key is being retrieved to.
This commit is contained in:
Joey Hess 2024-10-15 14:29:06 -04:00
parent 54fcc2ec51
commit 835283b862
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
8 changed files with 29 additions and 26 deletions

View file

@ -35,12 +35,15 @@ type Storer = Key -> ContentSource -> MeterUpdate -> Annex ()
-- Throws exception if key is not present, or remote is not accessible.
--
-- When it retrieves FileContent, it is responsible for updating the
-- MeterUpdate. And when the IncrementalVerifier is passed to it,
-- MeterUpdate, and the provided FilePath can be used to store the file
-- it retrieves.
--
-- When the IncrementalVerifier is passed to it,
-- and it retrieves FileContent, it can feed some or all of the file's
-- content to the verifier before running the callback.
-- This should not be done when it retrieves ByteContent.
type Retriever = forall a.
Key -> MeterUpdate -> Maybe IncrementalVerifier
Key -> MeterUpdate -> RawFilePath -> Maybe IncrementalVerifier
-> (ContentSource -> Annex a) -> Annex a
-- Action that removes a Key's content from a remote.