Skip to content

Commit

Permalink
Do not merge binaries if fake symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Sep 1, 2018
1 parent ff3dad2 commit 0543239
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion native/jni/core/bootstages.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,10 @@ void startup() {
"/data/user_de/0/com.topjohnwu.magisk/install", NULL };
char *bin_path = NULL;
for (int i = 0; alt_bin[i]; ++i) {
if (access(alt_bin[i], F_OK) == 0) {
struct stat st;
if (lstat(alt_bin[i], &st) != -1 && !S_ISLNK(st.st_mode)) {
rm_rf(DATABIN);
cp_afc(bin_path, DATABIN);
bin_path = alt_bin[i];
break;
}
Expand Down

0 comments on commit 0543239

Please sign in to comment.