mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 14:37:38 +00:00
Don't skip backup even if original does not exist
Close #5945, fix #5944
This commit is contained in:
parent
e2f3753551
commit
7bf9c74216
@ -142,14 +142,12 @@ void magisk_cpio::restore() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void magisk_cpio::backup(const char *orig) {
|
void magisk_cpio::backup(const char *orig) {
|
||||||
if (access(orig, R_OK))
|
|
||||||
return;
|
|
||||||
|
|
||||||
entry_map backups;
|
entry_map backups;
|
||||||
string rm_list;
|
string rm_list;
|
||||||
backups.emplace(".backup", new cpio_entry(S_IFDIR));
|
backups.emplace(".backup", new cpio_entry(S_IFDIR));
|
||||||
|
|
||||||
magisk_cpio o;
|
magisk_cpio o;
|
||||||
|
if (access(orig, R_OK) == 0)
|
||||||
o.load_cpio(orig);
|
o.load_cpio(orig);
|
||||||
|
|
||||||
// Remove existing backups in original ramdisk
|
// Remove existing backups in original ramdisk
|
||||||
|
Loading…
x
Reference in New Issue
Block a user