mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-20 07:11:33 +03:00
fix: don't follow the symbolic on Linux (#77)
This commit is contained in:
parent
4f52d829bb
commit
c051df3f60
@ -27,7 +27,7 @@ impl Default for PreviewAdaptor {
|
|||||||
}
|
}
|
||||||
match env::var("TERM_PROGRAM").unwrap_or_default().as_str() {
|
match env::var("TERM_PROGRAM").unwrap_or_default().as_str() {
|
||||||
"iTerm.app" => return Self::Iterm2,
|
"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,
|
"vscode" => return Self::Sixel,
|
||||||
"Hyper" => return Self::Sixel,
|
"Hyper" => return Self::Sixel,
|
||||||
_ => {}
|
_ => {}
|
||||||
|
2
core/src/external/file.rs
vendored
2
core/src/external/file.rs
vendored
@ -10,7 +10,7 @@ pub async fn file(files: &[impl AsRef<OsStr>]) -> Result<BTreeMap<PathBuf, Strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
let output = Command::new("file")
|
let output = Command::new("file")
|
||||||
.args(["-b", "--mime-type"])
|
.args([cfg!(windows).then_some("-b").unwrap_or("-bL"), "--mime-type"])
|
||||||
.args(files)
|
.args(files)
|
||||||
.kill_on_drop(true)
|
.kill_on_drop(true)
|
||||||
.output()
|
.output()
|
||||||
|
Loading…
Reference in New Issue
Block a user