Skip to content

Commit 374ce08

Browse files
committed
Auto merge of #17161 - l1nxy:discard-invalid-path, r=Veykril
fix: discard path when the path is invalid Close #17158
2 parents 1e61ed7 + 8d4ecc1 commit 374ce08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/vfs-notify/src/lib.rs

Lines changed: 1 addition & 1 deletion
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)