fix: incorrect matching behavior of glob pattern with full paths

This commit is contained in:
sxyazi 2023-10-10 22:57:36 +08:00
parent d56c8fd52a
commit 47e6fba677
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -17,7 +17,7 @@ impl Pattern {
pub fn matches(&self, str: impl AsRef<str>) -> bool { pub fn matches(&self, str: impl AsRef<str>) -> bool {
self.inner.matches_with(str.as_ref(), MatchOptions { self.inner.matches_with(str.as_ref(), MatchOptions {
case_sensitive: self.sensitive, case_sensitive: self.sensitive,
require_literal_separator: false, require_literal_separator: self.full_path,
require_literal_leading_dot: false, require_literal_leading_dot: false,
}) })
} }

View file

@ -24,10 +24,12 @@ serde_json = "^1"
syntect = "^5" syntect = "^5"
tokio = { version = "^1", features = [ "parking_lot", "macros", "rt-multi-thread", "sync", "time", "fs", "process", "io-std", "io-util" ] } tokio = { version = "^1", features = [ "parking_lot", "macros", "rt-multi-thread", "sync", "time", "fs", "process", "io-std", "io-util" ] }
tokio-stream = "^0" tokio-stream = "^0"
tracing = "^0"
trash = "^3" trash = "^3"
unicode-width = "^0" unicode-width = "^0"
yazi-prebuild = "^0" yazi-prebuild = "^0"
# Logging
tracing = "^0"
[target.'cfg(target_os = "windows")'.dependencies] [target.'cfg(target_os = "windows")'.dependencies]
clipboard-win = "^4" clipboard-win = "^4"