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 3257972d0..98002f83a 100644 --- a/app/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java +++ b/app/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java @@ -141,7 +141,9 @@ public class InstallMagisk extends ParallelTask { HttpURLConnection conn = WebService.mustRequest(Data.magiskLink, null); BufferedInputStream buf = new BufferedInputStream(new ProgressStream(conn)); buf.mark(Integer.MAX_VALUE); - try (OutputStream out = new FileOutputStream(new File(Download.EXTERNAL_PATH, filename))) { + File zip = new File(Download.EXTERNAL_PATH, filename); + zip.getParentFile().mkdirs(); + try (OutputStream out = new FileOutputStream(zip)) { ShellUtils.pump(buf, out); buf.reset(); }