Skip to content

Commit

Permalink
Auto merge of #17161 - l1nxy:discard-invalid-path, r=Veykril
Browse files Browse the repository at this point in the history
fix: discard path when the path is invalid

Close #17158
  • Loading branch information
bors committed Apr 30, 2024
2 parents 1e61ed7 + 8d4ecc1 commit 374ce08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/vfs-notify/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
Expand Down

0 comments on commit 374ce08

Please sign in to comment.