From 7f334c21e9f44e024efe7b466f60986420314290 Mon Sep 17 00:00:00 2001 From: crschnick Date: Wed, 9 Oct 2024 10:45:33 +0000 Subject: [PATCH] Fix progress being wrong for files < 1kb --- .../io/xpipe/app/browser/file/BrowserFileTransferOperation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileTransferOperation.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileTransferOperation.java index 8834881f6..edad848fc 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileTransferOperation.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileTransferOperation.java @@ -253,7 +253,7 @@ public class BrowserFileTransferOperation { var streamStartLength = inputStream.read(streamStart, 0, 1024); if (streamStartLength < 1024) { inputStream.close(); - inputStream = new ByteArrayInputStream(streamStart); + inputStream = new ByteArrayInputStream(streamStart, 0, streamStartLength); } else { inputStream.reset(); }