From 8d4ecc169fd1f1654ae3645c12b0d627cac0dcec Mon Sep 17 00:00:00 2001 From: Yu Zeng Date: Tue, 30 Apr 2024 15:39:05 +0800 Subject: [PATCH] discard when the path is invalid utf8 symbol. --- crates/vfs-notify/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/vfs-notify/src/lib.rs b/crates/vfs-notify/src/lib.rs index 45bb777d4d2b..1dbccab370c2 100644 --- a/crates/vfs-notify/src/lib.rs +++ b/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())); }