This commit is contained in:
sxyazi 2025-08-05 20:40:19 +08:00
parent 3ba13efddc
commit 7bb7a8179f
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

View file

@ -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 {

View file

@ -122,7 +122,7 @@ fn read_dir(lua: &Lua) -> mlua::Result<Function> {
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;
}