Skip to content

Commit

Permalink
Reset the downloadedBytes and totalFileBytes in the OTAImageProgress …
Browse files Browse the repository at this point in the history
…params to 0 when we prepare for download for BDX (#28309)
  • Loading branch information
nivi-apple authored and pull[bot] committed Sep 15, 2023
1 parent 051f6bb commit 2298656
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platform/Linux/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context)

unlink(imageProcessor->mImageFile);

imageProcessor->mParams.downloadedBytes = 0;
imageProcessor->mParams.totalFileBytes = 0;
imageProcessor->mHeaderParser.Init();
imageProcessor->mOfs.open(imageProcessor->mImageFile, std::ofstream::out | std::ofstream::ate | std::ofstream::app);
if (!imageProcessor->mOfs.good())
Expand Down

0 comments on commit 2298656

Please sign in to comment.