mirror of
https://github.com/denisidoro/navi.git
synced 2026-07-27 12:03:56 +00:00
fixed binding of std::env::current_exe in fs.rs
This commit is contained in:
parent
86abd59b63
commit
d1ed7bb9b9
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ use std::ffi::OsStr;
|
|||
use std::fs::{self, create_dir_all, File};
|
||||
use std::io;
|
||||
use thiserror::Error;
|
||||
use std::env::current_exe;
|
||||
|
||||
pub trait ToStringExt {
|
||||
fn to_string(&self) -> String;
|
||||
|
|
@ -77,7 +78,7 @@ fn follow_symlink(pathbuf: PathBuf) -> Result<PathBuf> {
|
|||
}
|
||||
|
||||
fn exe_pathbuf() -> Result<PathBuf> {
|
||||
let pathbuf = std::env::current_exe().context("Unable to acquire executable's path")?;
|
||||
let pathbuf = current_exe().context("Unable to acquire executable's path")?;
|
||||
|
||||
#[cfg(target_family = "windows")]
|
||||
let pathbuf = dunce::canonicalize(pathbuf)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue