mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Format
This commit is contained in:
parent
9535063628
commit
0d01a243ae
2 changed files with 5 additions and 4 deletions
|
|
@ -14,8 +14,9 @@ pub struct Partition {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Partition {
|
impl Partition {
|
||||||
// Match mount types that do not reliably emit change notifications, or do not update directory
|
// Match mount types that do not reliably emit change notifications, or do not
|
||||||
// metadata on changes, and should be refreshed frequently / heuristically.
|
// update directory metadata on changes, and should be refreshed frequently /
|
||||||
|
// heuristically.
|
||||||
pub fn heuristic(&self) -> bool {
|
pub fn heuristic(&self) -> bool {
|
||||||
let b: &[u8] = self.fstype.as_ref().map_or(b"", |s| s.as_encoded_bytes());
|
let b: &[u8] = self.fstype.as_ref().map_or(b"", |s| s.as_encoded_bytes());
|
||||||
matches!(b, b"exfat" | b"fuse.rclone")
|
matches!(b, b"exfat" | b"fuse.rclone")
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ impl Partitions {
|
||||||
}
|
}
|
||||||
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
|
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
|
||||||
{
|
{
|
||||||
// For now, assume other targets update directory stat data correctly & do not need
|
// For now, assume other targets update directory stat data correctly & do not
|
||||||
// heuristic polling.
|
// need heuristic polling.
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue