diff --git a/yazi-config/src/pattern.rs b/yazi-config/src/pattern.rs index 7bdae907..395754bf 100644 --- a/yazi-config/src/pattern.rs +++ b/yazi-config/src/pattern.rs @@ -8,12 +8,12 @@ use yazi_shared::url::{Scheme, Url}; #[derive(Debug, Deserialize)] #[serde(try_from = "String")] pub struct Pattern { - inner: globset::GlobMatcher, - scheme: PatternScheme, - is_dir: bool, - is_star: bool, + inner: globset::GlobMatcher, + scheme: PatternScheme, + pub is_dir: bool, + is_star: bool, #[cfg(windows)] - sep_lit: bool, + sep_lit: bool, } impl Pattern { diff --git a/yazi-plugin/src/fs/fs.rs b/yazi-plugin/src/fs/fs.rs index af8b47ef..83ceb6f6 100644 --- a/yazi-plugin/src/fs/fs.rs +++ b/yazi-plugin/src/fs/fs.rs @@ -122,7 +122,7 @@ fn read_dir(lua: &Lua) -> mlua::Result { let mut files = vec![]; while let Ok(Some(next)) = it.next_entry().await { let url = next.url(); - if pat.as_ref().is_some_and(|p| !p.match_url(&url, false)) { + if pat.as_ref().is_some_and(|p| !p.match_url(&url, p.is_dir)) { continue; }