mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 07:57:39 +00:00
Correct cpio's norm_path
This commit is contained in:
parent
d9b67a207b
commit
6f6b0ade06
@ -620,11 +620,10 @@ fn align_4(x: usize) -> usize {
|
||||
|
||||
#[inline(always)]
|
||||
fn norm_path(path: &str) -> String {
|
||||
path.strip_prefix('/')
|
||||
.unwrap_or(path)
|
||||
.strip_suffix('/')
|
||||
.unwrap_or(path)
|
||||
.to_string()
|
||||
path.split('/')
|
||||
.filter(|x| !x.is_empty())
|
||||
.intersperse("/")
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn parse_mode(s: &str) -> Result<mode_t, String> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user