mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
fix: Don't assert paths being utf8 when filtering them in the watcher
This commit is contained in:
parent
fe28e470cd
commit
ea447062c4
3 changed files with 14 additions and 8 deletions
|
@ -13,7 +13,7 @@ use std::fs;
|
|||
|
||||
use crossbeam_channel::{never, select, unbounded, Receiver, Sender};
|
||||
use notify::{Config, RecommendedWatcher, RecursiveMode, Watcher};
|
||||
use paths::{AbsPath, AbsPathBuf, Utf8Path};
|
||||
use paths::{AbsPath, AbsPathBuf};
|
||||
use vfs::loader;
|
||||
use walkdir::WalkDir;
|
||||
|
||||
|
@ -205,7 +205,7 @@ impl NotifyActor {
|
|||
if !entry.file_type().is_dir() {
|
||||
return true;
|
||||
}
|
||||
let path = AbsPath::assert(Utf8Path::from_path(entry.path()).unwrap());
|
||||
let path = entry.path();
|
||||
root == path
|
||||
|| dirs.exclude.iter().chain(&dirs.include).all(|it| it != path)
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue