1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-01-10 01:45:54 +01:00

check if last byte on block is downloaded

This commit is contained in:
kapodamy 2019-09-18 16:21:41 -03:00
parent 1bee297bba
commit ecb4bfde0b

View File

@ -117,7 +117,7 @@ public class DownloadRunnable extends Thread {
byte[] buf = new byte[DownloadMission.BUFFER_SIZE];
int len;
while (start < end && mMission.running && (len = is.read(buf, 0, buf.length)) != -1) {
while (start <= end && mMission.running && (len = is.read(buf, 0, buf.length)) != -1) {
f.write(buf, 0, len);
start += len;
block.done += len;