Always create core directories
This commit is contained in:
parent
ff110e3513
commit
a78ba44709
@ -452,12 +452,9 @@ static void link_busybox() {
|
||||
}
|
||||
|
||||
static int prepare_img() {
|
||||
int new_img = 0;
|
||||
|
||||
if (access(MAINIMG, F_OK) == -1) {
|
||||
if (create_img(MAINIMG, 64))
|
||||
return 1;
|
||||
new_img = 1;
|
||||
}
|
||||
|
||||
LOGI("* Mounting " MAINIMG "\n");
|
||||
@ -468,12 +465,11 @@ static int prepare_img() {
|
||||
|
||||
vec_init(&module_list);
|
||||
|
||||
if (new_img) {
|
||||
xmkdir(COREDIR, 0755);
|
||||
xmkdir(COREDIR "/post-fs-data.d", 0755);
|
||||
xmkdir(COREDIR "/service.d", 0755);
|
||||
xmkdir(COREDIR "/props", 0755);
|
||||
} else {
|
||||
|
||||
DIR *dir = xopendir(MOUNTPOINT);
|
||||
struct dirent *entry;
|
||||
while ((entry = xreaddir(dir))) {
|
||||
@ -506,7 +502,7 @@ static int prepare_img() {
|
||||
// Remount them back :)
|
||||
magiskloop = mount_image(MAINIMG, MOUNTPOINT);
|
||||
free(magiskloop);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user