Skip to content

Commit

Permalink
path -> PathBuf for openbsd/bitrig
Browse files Browse the repository at this point in the history
  • Loading branch information
semarie committed Feb 26, 2015
1 parent 610d169 commit 653ceee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libstd/sys/unix/os.rs
Expand Up @@ -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)))
}
}
}
Expand Down

0 comments on commit 653ceee

Please sign in to comment.