diff --git a/app/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java b/app/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java index 97aec05a1..ceccf23d3 100644 --- a/app/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java +++ b/app/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java @@ -147,7 +147,7 @@ public class InstallMagisk extends ParallelTask { console.add("- Downloading zip"); HttpURLConnection conn = WebService.mustRequest(Data.magiskLink, null); buf = new BufferedInputStream(new ProgressStream(conn), conn.getContentLength()); - buf.mark(conn.getContentLength()); + buf.mark(conn.getContentLength() + 1); try (OutputStream out = new FileOutputStream(zip)) { ShellUtils.pump(buf, out); } @@ -156,7 +156,7 @@ public class InstallMagisk extends ParallelTask { } else { console.add("- Existing zip found"); buf = new BufferedInputStream(new FileInputStream(zip), (int) zip.length()); - buf.mark((int) zip.length()); + buf.mark((int) zip.length() + 1); } console.add("- Extracting files");