Skip to content

Commit

Permalink
More precise new installer detection
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Mar 28, 2019
1 parent d1fa5be commit 8049b08
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/src/main/java/com/topjohnwu/magisk/container/Repo.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,14 @@ public String getFileUrl(String file) {
}

public boolean isNewInstaller() {
try (Request req = Networking.get(getFileUrl("install.sh"))) {
return req.connect().isSuccess();
try (Request install = Networking.get(getFileUrl("install.sh"))) {
if (install.connect().isSuccess()) {
// Double check whether config.sh exists
try (Request config = Networking.get(getFileUrl("config.sh"))) {
return !config.connect().isSuccess();
}
}
return false;
}
}

Expand Down

0 comments on commit 8049b08

Please sign in to comment.