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:
parent
54fcc2ec51
commit
835283b862
8 changed files with 29 additions and 26 deletions
|
@ -98,7 +98,7 @@ store repotop chunksize finalizer k b p = storeHelper repotop finalizer k $ \des
|
|||
- :/ This is legacy code..
|
||||
-}
|
||||
retrieve :: (RawFilePath -> Key -> [RawFilePath]) -> RawFilePath -> Retriever
|
||||
retrieve locations d basek p miv c = withOtherTmp $ \tmpdir -> do
|
||||
retrieve locations d basek p _dest miv c = withOtherTmp $ \tmpdir -> do
|
||||
showLongNote "This remote uses the deprecated chunksize setting. So this will be quite slow."
|
||||
let tmp = tmpdir P.</> keyFile basek <> ".directorylegacy.tmp"
|
||||
let tmp' = fromRawFilePath tmp
|
||||
|
@ -110,7 +110,7 @@ retrieve locations d basek p miv c = withOtherTmp $ \tmpdir -> do
|
|||
b <- liftIO $ L.readFile tmp'
|
||||
liftIO $ removeWhenExistsWith R.removeLink tmp
|
||||
sink b
|
||||
byteRetriever go basek p miv c
|
||||
byteRetriever go basek p tmp miv c
|
||||
|
||||
checkKey :: RawFilePath -> (RawFilePath -> Key -> [RawFilePath]) -> Key -> Annex Bool
|
||||
checkKey d locations k = liftIO $
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue