Skip to content

Commit

Permalink
fix toolbox path
Browse files Browse the repository at this point in the history
  • Loading branch information
vhdirk committed Mar 1, 2024
1 parent 7e2284b commit d9316b8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/components/terminal/spawn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,15 @@ impl FlatpakSpawner {

async fn toolbox_path() -> Result<PathBuf, TermsError> {
// first try if toolbox is found as sibling
if let Some(toolbox) = std::env::current_exe()
.ok()
.as_ref()
.and_then(|current_exe| current_exe.parent())
.map(|parent_dir| parent_dir.join(TOOLBOX))
.filter(|toolbox| toolbox.exists())
{
return Ok(toolbox);
}
// if let Some(toolbox) = std::env::current_exe()
// .ok()
// .as_ref()
// .and_then(|current_exe| current_exe.parent())
// .map(|parent_dir| parent_dir.join(TOOLBOX))
// .filter(|toolbox| toolbox.exists())
// {
// return Ok(toolbox);
// }

Ok(Self::host_root().await?.join(TOOLBOX))
}
Expand Down

0 comments on commit d9316b8

Please sign in to comment.