master
rascul 5 years ago
parent 18f900005b
commit bc4315762c

@ -76,11 +76,7 @@ impl Files {
} }
} }
pub fn set_linker_permissions( pub fn set_linker_permissions(libs: &[PathBuf], dir: &PathBuf, verbose: bool) -> MkrootResult<()> {
libs: &[PathBuf],
dir: &PathBuf,
verbose: bool,
) -> MkrootResult<()> {
for lib in libs { for lib in libs {
if let Some(fn_osstr) = &lib.file_name() { if let Some(fn_osstr) = &lib.file_name() {
if let Some(fn_str) = fn_osstr.to_str() { if let Some(fn_str) = fn_osstr.to_str() {
@ -112,10 +108,7 @@ fn open(p: &PathBuf) -> MkrootResult<()> {
Ok(()) Ok(())
} }
fn libs_from_ldd( fn libs_from_ldd(file: &PathBuf, config: &Config) -> MkrootResult<(Vec<PathBuf>, Vec<PathBuf>)> {
file: &PathBuf,
config: &Config,
) -> MkrootResult<(Vec<PathBuf>, Vec<PathBuf>)> {
let ldd = ldd(&file, &config)?; let ldd = ldd(&file, &config)?;
let mut libs: Vec<PathBuf> = Vec::new(); let mut libs: Vec<PathBuf> = Vec::new();
@ -150,12 +143,7 @@ fn libs_from_ldd(
Ok((libs, lib64s)) Ok((libs, lib64s))
} }
fn copy_files( fn copy_files(files: &[PathBuf], target: &PathBuf, mode: u32, verbose: bool) -> MkrootResult<()> {
files: &[PathBuf],
target: &PathBuf,
mode: u32,
verbose: bool,
) -> MkrootResult<()> {
for f in files { for f in files {
let mut t = PathBuf::from(&target); let mut t = PathBuf::from(&target);
if let Some(filename) = &f.file_name() { if let Some(filename) = &f.file_name() {

Loading…
Cancel
Save