From 887dfa2d5ceb10fd63838f94d62d81036c8e12a2 Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Sun, 27 Jun 2021 09:12:30 +0200 Subject: [PATCH] fix(core): fix wrong symlink detection on macOS --- espanso/src/path/macos.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/espanso/src/path/macos.rs b/espanso/src/path/macos.rs index c8821d0..c649e35 100644 --- a/espanso/src/path/macos.rs +++ b/espanso/src/path/macos.rs @@ -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()); }