mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 12:37:39 +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,15 +142,13 @@ void magisk_cpio::restore() {
|
||||
}
|
||||
|
||||
void magisk_cpio::backup(const char *orig) {
|
||||
if (access(orig, R_OK))
|
||||
return;
|
||||
|
||||
entry_map backups;
|
||||
string rm_list;
|
||||
backups.emplace(".backup", new cpio_entry(S_IFDIR));
|
||||
|
||||
magisk_cpio o;
|
||||
o.load_cpio(orig);
|
||||
if (access(orig, R_OK) == 0)
|
||||
o.load_cpio(orig);
|
||||
|
||||
// Remove existing backups in original ramdisk
|
||||
o.rm(".backup", true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user