mirror of
https://github.com/darakian/ddh.git
synced 2026-09-10 07:06:21 -04:00
Add simple debug output
This commit is contained in:
parent
fd25477f1f
commit
b973813fde
|
|
@ -54,6 +54,10 @@ pub fn deduplicate_dirs<P: AsRef<Path> + Sync>(search_dirs: Vec<P>) -> (Vec<File
|
|||
}
|
||||
|
||||
fn traverse_and_spawn(current_path: &Path, sender: Sender<ChannelPackage>) -> (){
|
||||
println!("Processing {:?}.\ Metadata {:?}",
|
||||
current_path,
|
||||
current_path.metadata.expect("Error unwrapping metadata")
|
||||
);
|
||||
let current_path_metadata = match fs::symlink_metadata(current_path) {
|
||||
Err(e) =>{
|
||||
sender.send(
|
||||
|
|
@ -63,7 +67,6 @@ fn traverse_and_spawn(current_path: &Path, sender: Sender<ChannelPackage>) -> ()
|
|||
},
|
||||
Ok(meta) => meta,
|
||||
};
|
||||
|
||||
if current_path_metadata.file_type().is_symlink(){
|
||||
sender.send(
|
||||
ChannelPackage::Fail(current_path.to_path_buf(), Error::new(ErrorKind::Other, "Path is symlink"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue