mirror of
https://github.com/rust-lang/rust
synced 2024-10-14 04:23:37 +00:00
Auto merge of #22825 - semarie:openbsd-pathbuf, r=alexcrichton
unbreak openbsd/bitrig build after 2d200c9c
(the complete build/check on openbsd is in progress)
@dhuseby maybe this one is in your list ?
This commit is contained in:
commit
b47aebe3fc
|
@ -229,7 +229,8 @@ pub fn current_exe() -> io::Result<PathBuf> {
|
|||
if v.is_null() {
|
||||
Err(io::Error::last_os_error())
|
||||
} 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…
Reference in a new issue