From 81e1d6de87feef45c19e8acef64462377df9b97e Mon Sep 17 00:00:00 2001 From: GoldenGuy1000 <73797581+GoldenGuy1000@users.noreply.github.com> Date: Sat, 15 Feb 2025 03:22:32 -0800 Subject: [PATCH] Fixed a Helix crash on launch when the install directory cannot be canonicalized (the ol' `.unwrap_or`) --- helix-loader/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-loader/src/lib.rs b/helix-loader/src/lib.rs index 0e7c134d0..47e67ac50 100644 --- a/helix-loader/src/lib.rs +++ b/helix-loader/src/lib.rs @@ -69,7 +69,7 @@ fn prioritize_runtime_dirs() -> Vec { // canonicalize the path in case the executable is symlinked let exe_rt_dir = std::env::current_exe() .ok() - .and_then(|path| std::fs::canonicalize(path).ok()) + .and_then(|path| Some(std::fs::canonicalize(&path).unwrap_or(path))) .and_then(|path| path.parent().map(|path| path.to_path_buf().join(RT_DIR))) .unwrap(); rt_dirs.push(exe_rt_dir);