Skip to content

Commit

Permalink
apphost: Fix handling of relative symlinks
Browse files Browse the repository at this point in the history
Fixes #2
  • Loading branch information
Popax21 committed Apr 19, 2024
1 parent a2a358b commit 3fbb744
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apphost/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ fn main() -> ExitCode {
let install_dir = if !cfg!(feature="testapp") {
let mut exe_path = std::env::current_exe().unwrap();
if let Ok(link_exe_path) = std::fs::read_link(&exe_path) {
exe_path = link_exe_path
exe_path.pop();
exe_path.push(link_exe_path);
}

PathBuf::from(exe_path.parent().unwrap())
Expand Down

0 comments on commit 3fbb744

Please sign in to comment.