mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
24056454b4
commit
c35cc43601
1 changed files with 4 additions and 4 deletions
|
|
@ -81,13 +81,13 @@ impl Files {
|
|||
)
|
||||
}
|
||||
|
||||
pub async fn assert_stale(cwd: &Url, cha: Cha) -> Option<Cha> {
|
||||
pub async fn assert_stale(dir: &Url, cha: Cha) -> Option<Cha> {
|
||||
use std::io::ErrorKind;
|
||||
match fs::metadata(cwd).await.map(Cha::from) {
|
||||
Ok(c) if !c.is_dir() => FilesOp::issue_error(cwd, ErrorKind::NotADirectory).await,
|
||||
match fs::metadata(dir).await.map(Cha::from) {
|
||||
Ok(c) if !c.is_dir() => FilesOp::issue_error(dir, ErrorKind::NotADirectory).await,
|
||||
Ok(c) if c.hits(cha) && PARTITIONS.read().heuristic(cha) => {}
|
||||
Ok(c) => return Some(c),
|
||||
Err(e) => FilesOp::issue_error(cwd, e.kind()).await,
|
||||
Err(e) => FilesOp::issue_error(dir, e.kind()).await,
|
||||
}
|
||||
None
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue