diff options
| author | Sébastien Marie <semarie@users.noreply.github.com> | 2015-02-26 06:16:41 +0100 |
|---|---|---|
| committer | Sébastien Marie <semarie@users.noreply.github.com> | 2015-02-26 06:16:41 +0100 |
| commit | 653ceee3b3a777ea452e718835e0b27cf369906c (patch) | |
| tree | df550b3c45c7d8fa117f9e934014920425ea4e2e /src/libstd/sys | |
| parent | 610d1695d1e0f1bb4e59449d8ba70409b1dc610c (diff) | |
| download | rust-653ceee3b3a777ea452e718835e0b27cf369906c.tar.gz rust-653ceee3b3a777ea452e718835e0b27cf369906c.zip | |
path -> PathBuf for openbsd/bitrig
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/os.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs index 899280aa709..a38c7a30b75 100644 --- a/src/libstd/sys/unix/os.rs +++ b/src/libstd/sys/unix/os.rs @@ -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))) } } } |
