Fix bug downloading large files with the Azure SDK

This commit is contained in:
Dave Hadka committed 2020-07-20 15:36:34 -05:00
1 parent b69f511388
commit 2b92697208
4 files changed
+10 -31

No files matched your search

+5 -2
View File
@@ -249,15 +249,18 @@ export async function downloadCacheStorageSDK(
downloadProgress.startDisplayTimer()
while (!downloadProgress.isDone()) {
const segmentStart =
downloadProgress.segmentOffset + downloadProgress.segmentSize
const segmentSize = Math.min(
maxSegmentSize,
contentLength - downloadProgress.segmentOffset
contentLength - segmentStart
)
downloadProgress.nextSegment(segmentSize)
const result = await client.downloadToBuffer(
downloadProgress.segmentOffset,
segmentStart,
segmentSize,
{
concurrency: options.downloadConcurrency,