diff --git a/app/src/main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java b/app/src/main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java index 2e86a8831..477f6b6d7 100644 --- a/app/src/main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java +++ b/app/src/main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java @@ -28,12 +28,14 @@ public class ProcessRepoZip extends ParallelTask { private ProgressDialog progressDialog; private boolean mInstall; - private String mLink, mFile; + private String mLink; + private File mFile; public ProcessRepoZip(Activity context, String link, String filename, boolean install) { super(context); mLink = link; - mFile = Environment.getExternalStorageDirectory() + "/MagiskManager/" + filename; + mFile = new File(Environment.getExternalStorageDirectory() + "/MagiskManager", filename); + mFile.getParentFile().mkdirs(); mInstall = install; } @@ -108,7 +110,7 @@ public class ProcessRepoZip extends ParallelTask { Activity activity = getActivity(); if (activity == null) return; progressDialog.dismiss(); - Uri uri = Uri.fromFile(new File(mFile)); + Uri uri = Uri.fromFile(mFile); if (result) { if (Shell.rootAccess() && mInstall) { Intent intent = new Intent(getActivity(), FlashActivity.class); diff --git a/build.gradle b/build.gradle index aa96c61c1..405d492cd 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { maven { url "https://maven.google.com" } } dependencies { - classpath 'com.android.tools.build:gradle:3.0.0-beta4' + classpath 'com.android.tools.build:gradle:3.0.0-beta5' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files