Skip to content

Commit f866d75

Browse files
committed
fix: incomplete hidden state check on Windows for Cha (#2835)
1 parent 2d95221 commit f866d75

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

yazi-fs/src/cha/cha.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ impl Cha {
7676
}
7777

7878
#[inline]
79-
pub fn from_dummy(url: &Url, ft: Option<FileType>) -> Self {
79+
pub fn from_dummy(_url: &Url, ft: Option<FileType>) -> Self {
8080
let mut me = ft.map(Self::from_half_ft).unwrap_or_default();
8181
#[cfg(unix)]
82-
if yazi_shared::url::Urn::new(url).is_hidden() {
82+
if yazi_shared::url::Urn::new(_url).is_hidden() {
8383
me.kind |= ChaKind::HIDDEN;
8484
}
8585
me
@@ -182,7 +182,10 @@ impl Cha {
182182

183183
#[inline]
184184
pub const fn is_hidden(&self) -> bool {
185-
win_either!(self.kind.contains(ChaKind::SYSTEM), self.kind.contains(ChaKind::HIDDEN))
185+
win_either!(
186+
self.kind.contains(ChaKind::HIDDEN) || self.kind.contains(ChaKind::SYSTEM),
187+
self.kind.contains(ChaKind::HIDDEN)
188+
)
186189
}
187190

188191
#[inline]

0 commit comments

Comments
 (0)