path -> PathBuf for openbsd/bitrig
This commit is contained in:
parent
610d1695d1
commit
653ceee3b3
1 changed files with 2 additions and 1 deletions
|
@ -229,7 +229,8 @@ pub fn current_exe() -> io::Result<PathBuf> {
|
||||||
if v.is_null() {
|
if v.is_null() {
|
||||||
Err(io::Error::last_os_error())
|
Err(io::Error::last_os_error())
|
||||||
} else {
|
} else {
|
||||||
Ok(Path::new(CStr::from_ptr(v).to_bytes().to_vec()))
|
let vec = CStr::from_ptr(v).to_bytes().to_vec();
|
||||||
|
Ok(PathBuf::new::<OsString>(&OsStringExt::from_vec(vec)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue