Fix fifo files hanging the project wide search (#16039)

Release Notes:

- Fixed the issue related to the project wide search being stuck when
project contains .fifo files
- Might potentially solve the following issue
https://github.com/zed-industries/zed/issues/7360
This commit is contained in:
TheCub3 2024-08-26 21:40:20 +05:00 committed by GitHub
parent aaddb73b28
commit 2f08a0a28c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 34 additions and 3 deletions

View file

@ -10969,10 +10969,15 @@ async fn search_snapshots(
abs_path.clear();
abs_path.push(&snapshot.abs_path());
abs_path.push(&entry.path);
if let Some(file) = fs.open_sync(&abs_path).await.log_err() {
query.detect(file).unwrap_or(false)
} else {
if entry.is_fifo {
false
} else {
if let Some(file) = fs.open_sync(&abs_path).await.log_err() {
query.detect(file).unwrap_or(false)
} else {
false
}
}
} else {
false