mirror of
https://github.com/tiann/KernelSU.git
synced 2025-02-20 11:43:32 +08:00
ksud: fmt
This commit is contained in:
parent
5355625ed6
commit
ed254b7ab4
@ -265,7 +265,7 @@ fn copy_xattrs(src_path: impl AsRef<Path>, dest_path: impl AsRef<Path>) -> Resul
|
|||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||||
pub fn copy_module_files(source: impl AsRef<Path>, destination: impl AsRef<Path>) -> Result<()> {
|
pub fn copy_module_files(source: impl AsRef<Path>, destination: impl AsRef<Path>) -> Result<()> {
|
||||||
use rustix::fs::FileTypeExt;
|
use rustix::fs::FileTypeExt;
|
||||||
@ -285,9 +285,7 @@ pub fn copy_module_files(source: impl AsRef<Path>, destination: impl AsRef<Path>
|
|||||||
|
|
||||||
if entry.file_type().is_file() {
|
if entry.file_type().is_file() {
|
||||||
std::fs::copy(&source_path, &dest_path).with_context(|| {
|
std::fs::copy(&source_path, &dest_path).with_context(|| {
|
||||||
format!(
|
format!("Failed to copy file from {source_path:?} to {dest_path:?}",)
|
||||||
"Failed to copy file from {source_path:?} to {dest_path:?}",
|
|
||||||
)
|
|
||||||
})?;
|
})?;
|
||||||
copy_xattrs(&source_path, &dest_path)?;
|
copy_xattrs(&source_path, &dest_path)?;
|
||||||
} else if entry.file_type().is_symlink() {
|
} else if entry.file_type().is_symlink() {
|
||||||
@ -337,4 +335,4 @@ pub fn copy_module_files(source: impl AsRef<Path>, destination: impl AsRef<Path>
|
|||||||
#[cfg(not(any(target_os = "linux", target_os = "android")))]
|
#[cfg(not(any(target_os = "linux", target_os = "android")))]
|
||||||
pub fn copy_module_files(_source: impl AsRef<Path>, _destination: impl AsRef<Path>) -> Result<()> {
|
pub fn copy_module_files(_source: impl AsRef<Path>, _destination: impl AsRef<Path>) -> Result<()> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user