mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
3ba13efddc
commit
7bb7a8179f
2 changed files with 6 additions and 6 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue