mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-21 10:38:30 +00:00
Fix typo
This commit is contained in:
parent
f33f1d25d0
commit
d1621845b8
@ -193,7 +193,7 @@ impl<T: Write> WriteExt for T {
|
|||||||
pub struct DirEntry<'a> {
|
pub struct DirEntry<'a> {
|
||||||
dir: &'a Directory<'a>,
|
dir: &'a Directory<'a>,
|
||||||
entry: &'a dirent,
|
entry: &'a dirent,
|
||||||
name_len: usize,
|
d_name_len: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DirEntry<'_> {
|
impl DirEntry<'_> {
|
||||||
@ -201,7 +201,7 @@ impl DirEntry<'_> {
|
|||||||
unsafe {
|
unsafe {
|
||||||
CStr::from_bytes_with_nul_unchecked(slice::from_raw_parts(
|
CStr::from_bytes_with_nul_unchecked(slice::from_raw_parts(
|
||||||
self.d_name.as_ptr().cast(),
|
self.d_name.as_ptr().cast(),
|
||||||
self.name_len,
|
self.d_name_len,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -322,7 +322,7 @@ impl<'a> Directory<'a> {
|
|||||||
let e = DirEntry {
|
let e = DirEntry {
|
||||||
dir: self,
|
dir: self,
|
||||||
entry,
|
entry,
|
||||||
name_len: d_name.to_bytes().len(),
|
d_name_len: d_name.to_bytes_with_nul().len(),
|
||||||
};
|
};
|
||||||
Ok(Some(e))
|
Ok(Some(e))
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user