Skip to content

Fix CanWrite condition#222

Open
YerongAI wants to merge 1 commit intobezzad:masterfrom
YerongAI:patch-1
Open

Fix CanWrite condition#222
YerongAI wants to merge 1 commit intobezzad:masterfrom
YerongAI:patch-1

Conversation

@YerongAI
Copy link
Copy Markdown

The BlockSize is 1024 by default. When a file is divided into exactly 1025 bytes each chunk. The ChunkDownloader will download 1024 bytes first, and write to the chunk Stream.

After that, the Chunk Position will be changed to 1024, however, there is still 1 byte of stream to be downloaded.

The Start + Position < End will be false. Because 0+1024<1024. Change it to Start + Position <= End can fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant