From c051df3f605108a45b8cd69be8f1d7910442fe7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E9=9B=85=20=C2=B7=20Misaki=20Masa?= Date: Sun, 20 Aug 2023 21:44:39 +0800 Subject: [PATCH] fix: don't follow the symbolic on Linux (#77) --- config/preset/yazi.toml | 2 +- config/src/preview/adaptor.rs | 2 +- core/src/external/file.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/preset/yazi.toml b/config/preset/yazi.toml index 1b5edd40..18c69eb9 100644 --- a/config/preset/yazi.toml +++ b/config/preset/yazi.toml @@ -56,7 +56,7 @@ rules = [ { mime = "application/x-bzip2", use = "archive" }, { mime = "application/x-tar", use = "archive" }, { mime = "application/x-7z-compressed", use = "archive" }, - { mime = "application/x-rar",use = "archive" }, + { mime = "application/x-rar", use = "archive" }, { mime = "*", use = "fallback" }, ] diff --git a/config/src/preview/adaptor.rs b/config/src/preview/adaptor.rs index 5cc62b3b..c605613a 100644 --- a/config/src/preview/adaptor.rs +++ b/config/src/preview/adaptor.rs @@ -27,7 +27,7 @@ impl Default for PreviewAdaptor { } match env::var("TERM_PROGRAM").unwrap_or_default().as_str() { "iTerm.app" => return Self::Iterm2, - "WezTerm" => return if cfg!(windows) { Self::Iterm2 } else { Self::Kitty }, + "WezTerm" => return cfg!(windows).then_some(Self::Iterm2).unwrap_or(Self::Kitty), "vscode" => return Self::Sixel, "Hyper" => return Self::Sixel, _ => {} diff --git a/core/src/external/file.rs b/core/src/external/file.rs index 2a46276f..7aac54ae 100644 --- a/core/src/external/file.rs +++ b/core/src/external/file.rs @@ -10,7 +10,7 @@ pub async fn file(files: &[impl AsRef]) -> Result