fix(core): fix wrong symlink detection on macOS

This commit is contained in:
Federico Terzi 2021-06-27 09:12:30 +02:00
parent 4734eabb0d
commit 887dfa2d5c

View File

@ -75,7 +75,7 @@ pub fn add_espanso_to_path(prompt_when_necessary: bool) -> Result<()> {
pub fn remove_espanso_from_path(prompt_when_necessary: bool) -> Result<()> {
let target_link_path = PathBuf::from("/usr/local/bin/espanso");
if !target_link_path.is_file() {
if std::fs::symlink_metadata(&target_link_path).is_err() {
return Err(PathError::SymlinkNotFound.into());
}