discard when the path is invalid utf8 symbol.

This commit is contained in:
Yu Zeng 2024-04-30 15:39:05 +08:00
parent f7de09415c
commit 8f3eecc369

View File

@ -222,7 +222,7 @@ fn load_entry(
let depth = entry.depth();
let is_dir = entry.file_type().is_dir();
let is_file = entry.file_type().is_file();
let abs_path = AbsPathBuf::try_from(entry.into_path()).unwrap();
let abs_path = AbsPathBuf::try_from(entry.into_path()).ok()?;
if depth < 2 && is_dir {
self.send(make_message(abs_path.clone()));
}