about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorYu Zeng <l1nxy.zy@gmail.com>2024-04-30 15:39:05 +0800
committerYu Zeng <l1nxy.zy@gmail.com>2024-04-30 15:39:05 +0800
commit8f3eecc369bc7525e5ee5d795a83f952b2f9fbc1 (patch)
tree837cfbacacf8a54dab9e40a844e2982c5e2dbbed /src
parentf7de09415c93a67ad3356a3d2eaebc96dcecb7ca (diff)
downloadrust-8f3eecc369bc7525e5ee5d795a83f952b2f9fbc1.tar.gz
rust-8f3eecc369bc7525e5ee5d795a83f952b2f9fbc1.zip
discard when the path is invalid utf8 symbol.
Diffstat (limited to 'src')
-rw-r--r--src/tools/rust-analyzer/crates/vfs-notify/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/vfs-notify/src/lib.rs b/src/tools/rust-analyzer/crates/vfs-notify/src/lib.rs
index 45bb777d4d2..1dbccab370c 100644
--- a/src/tools/rust-analyzer/crates/vfs-notify/src/lib.rs
+++ b/src/tools/rust-analyzer/crates/vfs-notify/src/lib.rs
@@ -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()));
                         }