We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a5214e4 + 653ceee commit b47aebeCopy full SHA for b47aebe
src/libstd/sys/unix/os.rs
@@ -229,7 +229,8 @@ pub fn current_exe() -> io::Result<PathBuf> {
229
if v.is_null() {
230
Err(io::Error::last_os_error())
231
} else {
232
- Ok(Path::new(CStr::from_ptr(v).to_bytes().to_vec()))
+ let vec = CStr::from_ptr(v).to_bytes().to_vec();
233
+ Ok(PathBuf::new::<OsString>(&OsStringExt::from_vec(vec)))
234
}
235
236
0 commit comments