aboutsummaryrefslogtreecommitdiff
path: root/helix-loader
diff options
context:
space:
mode:
Diffstat (limited to 'helix-loader')
-rw-r--r--helix-loader/src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/helix-loader/src/lib.rs b/helix-loader/src/lib.rs
index 015b39a5..3c9905f5 100644
--- a/helix-loader/src/lib.rs
+++ b/helix-loader/src/lib.rs
@@ -42,8 +42,10 @@ pub fn runtime_dir() -> PathBuf {
}
// fallback to location of the executable being run
+ // canonicalize the path in case the executable is symlinked
std::env::current_exe()
.ok()
+ .and_then(|path| std::fs::canonicalize(path).ok())
.and_then(|path| path.parent().map(|path| path.to_path_buf().join(RT_DIR)))
.unwrap()
}