From e7d946bb8dd6289ef7024c4f75d1d24da009ebec Mon Sep 17 00:00:00 2001 From: CrendKing <975235+CrendKing@users.noreply.github.com> Date: Sun, 8 Oct 2023 15:57:52 -0700 Subject: [PATCH] Fix detecting msedge.exe in Windows when Chrome is not found through registry (#409) --- src/browser/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/browser/mod.rs b/src/browser/mod.rs index fb0b4193..8db92371 100644 --- a/src/browser/mod.rs +++ b/src/browser/mod.rs @@ -482,12 +482,12 @@ pub fn default_executable() -> Result { if let Some(path) = get_chrome_path_from_registry() { if path.exists() { return Ok(path); - } else { - for path in &[r"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"][..] { - if std::path::Path::new(path).exists() { - return Ok(path.into()); - } - } + } + } + + for path in &[r"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"][..] { + if std::path::Path::new(path).exists() { + return Ok(path.into()); } } }