Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
7bf9c742
Commit
7bf9c742
authored
Jun 08, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't skip backup even if original does not exist
Close #5945, fix #5944
parent
e2f37535
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
ramdisk.cpp
native/jni/boot/ramdisk.cpp
+2
-4
No files found.
native/jni/boot/ramdisk.cpp
View file @
7bf9c742
...
@@ -142,15 +142,13 @@ void magisk_cpio::restore() {
...
@@ -142,15 +142,13 @@ 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
;
o
.
load_cpio
(
orig
);
if
(
access
(
orig
,
R_OK
)
==
0
)
o
.
load_cpio
(
orig
);
// Remove existing backups in original ramdisk
// Remove existing backups in original ramdisk
o
.
rm
(
".backup"
,
true
);
o
.
rm
(
".backup"
,
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment