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

@ -177,7 +177,7 @@ store' r k b p = go =<< glacierEnv c gc u
forceSuccessProcess cmd pid
go' _ _ _ _ _ = error "internal"
retrieve :: forall a. Remote -> Key -> MeterUpdate -> Maybe IncrementalVerifier -> (ContentSource -> Annex a) -> Annex a
retrieve :: forall a. Remote -> Key -> MeterUpdate -> RawFilePath -> Maybe IncrementalVerifier -> (ContentSource -> Annex a) -> Annex a
retrieve = byteRetriever . retrieve'
retrieve' :: forall a. Remote -> Key -> (L.ByteString -> Annex a) -> Annex a