Skip to content

Commit 27fa563

Browse files
committed
Auto merge of rust-lang#17161 - l1nxy:discard-invalid-path, r=Veykril
fix: discard path when the path is invalid Close rust-lang#17158
2 parents f7de094 + 8f3eecc commit 27fa563

File tree

1 file changed

+1
-1
lines changed
  • src/tools/rust-analyzer/crates/vfs-notify/src

1 file changed

+1
-1
lines changed

src/tools/rust-analyzer/crates/vfs-notify/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ impl NotifyActor {
222222
let depth = entry.depth();
223223
let is_dir = entry.file_type().is_dir();
224224
let is_file = entry.file_type().is_file();
225-
let abs_path = AbsPathBuf::try_from(entry.into_path()).unwrap();
225+
let abs_path = AbsPathBuf::try_from(entry.into_path()).ok()?;
226226
if depth < 2 && is_dir {
227227
self.send(make_message(abs_path.clone()));
228228
}

0 commit comments

Comments
 (0)