Fix progress being wrong for files < 1kb

This commit is contained in:
crschnick 2024-10-09 10:45:33 +00:00
parent aa62161b8f
commit 7f334c21e9

View file

@ -253,7 +253,7 @@ public class BrowserFileTransferOperation {
var streamStartLength = inputStream.read(streamStart, 0, 1024); var streamStartLength = inputStream.read(streamStart, 0, 1024);
if (streamStartLength < 1024) { if (streamStartLength < 1024) {
inputStream.close(); inputStream.close();
inputStream = new ByteArrayInputStream(streamStart); inputStream = new ByteArrayInputStream(streamStart, 0, streamStartLength);
} else { } else {
inputStream.reset(); inputStream.reset();
} }