Auto merge of #17161 - l1nxy:discard-invalid-path, r=Veykril

fix: discard path when the path is invalid

Close #17158
This commit is contained in:
bors 2024-04-30 08:33:05 +00:00
commit 27fa5639c3

View File

@ -222,7 +222,7 @@ impl NotifyActor {
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()));
}