Commit 7bf9c742 authored by topjohnwu's avatar topjohnwu

Don't skip backup even if original does not exist

Close #5945, fix #5944
parent e2f37535
...@@ -142,14 +142,12 @@ void magisk_cpio::restore() { ...@@ -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
......
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