Commit d19f65ce authored by Zackptg5's avatar Zackptg5 Committed by John Wu

Ignore twrp fstabs

parent 025b0605
...@@ -47,8 +47,11 @@ void magisk_cpio::patch() { ...@@ -47,8 +47,11 @@ void magisk_cpio::patch() {
for (auto it = entries.begin(); it != entries.end();) { for (auto it = entries.begin(); it != entries.end();) {
auto cur = it++; auto cur = it++;
bool fstab = (!keepverity || !keepforceencrypt) && bool fstab = (!keepverity || !keepforceencrypt) &&
!str_starts(cur->first, ".backup") && S_ISREG(cur->second->mode) &&
str_contains(cur->first, "fstab") && S_ISREG(cur->second->mode); !str_starts(cur->first, ".backup") &&
!str_contains(cur->first, "twrp") &&
!str_contains(cur->first, "recovery") &&
str_contains(cur->first, "fstab");
if (!keepverity) { if (!keepverity) {
if (fstab) { if (fstab) {
fprintf(stderr, "Found fstab file [%s]\n", cur->first.data()); fprintf(stderr, "Found fstab file [%s]\n", cur->first.data());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment