improve path concat

redo-gragh
Avril 4 years ago
parent 0e2653c087
commit 0e7ad1afb4
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -48,9 +48,9 @@ pub async fn work_on_all(state: State) -> INodeInfoGraph
match tokio::fs::symlink_metadata(&path).await { match tokio::fs::symlink_metadata(&path).await {
Ok(meta) => { Ok(meta) => {
let inode = meta.inode(); let inode = meta.inode();
tokio::spawn(walk(state.clone(), path.clone(), inode)).await tokio::spawn(walk(state.clone(), path, inode)).await
.ok() .ok()
.map(move |res| (res, path)) //.map(move |res| (res, path))
}, },
Err(err) => { Err(err) => {
eprintln!("Failed to stat root {:?}: {}", path, err); eprintln!("Failed to stat root {:?}: {}", path, err);
@ -69,8 +69,10 @@ pub async fn work_on_all(state: State) -> INodeInfoGraph
for path_comp in comp_children for path_comp in comp_children
{ {
if let Some((res, _root)) = path_comp if let Some(res) = path_comp
{ {
output.extend(res);
/*
for (path, ino) in res.into_iter() for (path, ino) in res.into_iter()
{ {
// If this inode is not in the map, this is a top-level path. // If this inode is not in the map, this is a top-level path.
@ -82,7 +84,7 @@ pub async fn work_on_all(state: State) -> INodeInfoGraph
//} else { //} else {
// eprintln!("No ino entry for {:?} ({:?})", path, ino); // eprintln!("No ino entry for {:?} ({:?})", path, ino);
//} //}
} }*/
} }
} }

Loading…
Cancel
Save