You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
No greedy match to find parent mount point
This fixes /sys is considered as a parent mount point of /system
This commit is contained in:
@@ -27,11 +27,12 @@ void revert_unmount() {
|
||||
|
||||
if (targets.empty()) return;
|
||||
|
||||
for (auto last_target = targets.cbegin(), iter = next(targets.cbegin()); iter != targets.cend();) {
|
||||
if (iter->starts_with(*last_target)) {
|
||||
auto last_target = *targets.cbegin() + '/';
|
||||
for (auto iter = next(targets.cbegin()); iter != targets.cend();) {
|
||||
if (iter->starts_with(last_target)) {
|
||||
iter = targets.erase(iter);
|
||||
} else {
|
||||
last_target = iter++;
|
||||
last_target = *iter++ + '/';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user