Skip to content

Commit 653ceee

Browse files
committed
path -> PathBuf for openbsd/bitrig
1 parent 610d169 commit 653ceee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libstd/sys/unix/os.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ pub fn current_exe() -> io::Result<PathBuf> {
229229
if v.is_null() {
230230
Err(io::Error::last_os_error())
231231
} else {
232-
Ok(Path::new(CStr::from_ptr(v).to_bytes().to_vec()))
232+
let vec = CStr::from_ptr(v).to_bytes().to_vec();
233+
Ok(PathBuf::new::<OsString>(&OsStringExt::from_vec(vec)))
233234
}
234235
}
235236
}

0 commit comments

Comments
 (0)