fix: channel blockage caused by fuse permissions under the root user

This commit is contained in:
sxyazi 2023-10-25 23:52:33 +08:00
parent 24fd587431
commit ad07af6ecf
No known key found for this signature in database

View file

@ -52,8 +52,10 @@ impl Files {
while let Ok(Some(item)) = it.next_entry().await {
select! {
_ = tx.closed() => break,
Ok(meta) = item.metadata() => {
tx.send(File::from_meta(Url::from(item.path()), meta).await).ok();
result = item.metadata() => {
if let Ok(meta) = result {
tx.send(File::from_meta(Url::from(item.path()), meta).await).ok();
}
}
}
}