mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: incomplete hidden state check on Windows for Cha (#2835)
This commit is contained in:
parent
2d95221f59
commit
f866d75ef0
1 changed files with 6 additions and 3 deletions
|
|
@ -76,10 +76,10 @@ impl Cha {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn from_dummy(url: &Url, ft: Option<FileType>) -> Self {
|
pub fn from_dummy(_url: &Url, ft: Option<FileType>) -> Self {
|
||||||
let mut me = ft.map(Self::from_half_ft).unwrap_or_default();
|
let mut me = ft.map(Self::from_half_ft).unwrap_or_default();
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
if yazi_shared::url::Urn::new(url).is_hidden() {
|
if yazi_shared::url::Urn::new(_url).is_hidden() {
|
||||||
me.kind |= ChaKind::HIDDEN;
|
me.kind |= ChaKind::HIDDEN;
|
||||||
}
|
}
|
||||||
me
|
me
|
||||||
|
|
@ -182,7 +182,10 @@ impl Cha {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn is_hidden(&self) -> bool {
|
pub const fn is_hidden(&self) -> bool {
|
||||||
win_either!(self.kind.contains(ChaKind::SYSTEM), self.kind.contains(ChaKind::HIDDEN))
|
win_either!(
|
||||||
|
self.kind.contains(ChaKind::HIDDEN) || self.kind.contains(ChaKind::SYSTEM),
|
||||||
|
self.kind.contains(ChaKind::HIDDEN)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue