canonicalize and back

This commit is contained in:
Jon Moroney 2020-07-19 11:57:55 -07:00
parent 02fa5fce44
commit 48a967105c

View file

@ -54,6 +54,8 @@ pub fn deduplicate_dirs<P: AsRef<Path> + Sync>(search_dirs: Vec<P>) -> (Vec<File
} }
fn traverse_and_spawn(current_path: &Path, sender: Sender<ChannelPackage>) -> (){ fn traverse_and_spawn(current_path: &Path, sender: Sender<ChannelPackage>) -> (){
let can_path = current_path.canonicalize().expect("Error canonicalizing path");
let current_path = can_path.as_path();
println!("Processing {:?}.\n Metadata {:?}", println!("Processing {:?}.\n Metadata {:?}",
current_path, current_path,
current_path.metadata().expect("Error unwrapping metadata") current_path.metadata().expect("Error unwrapping metadata")