about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-02-26 23:04:03 +0000
committerbors <bors@rust-lang.org>2015-02-26 23:04:03 +0000
commitb47aebe3fc2da06c760fd8ea19f84cbc41d34831 (patch)
tree47e6cd1e56ef14533fcd2ea6e53e59a414362c5e /src/libstd/sys
parenta5214e4330e8186da7b1117119a7dccfc36a2e6b (diff)
parent653ceee3b3a777ea452e718835e0b27cf369906c (diff)
downloadrust-b47aebe3fc2da06c760fd8ea19f84cbc41d34831.tar.gz
rust-b47aebe3fc2da06c760fd8ea19f84cbc41d34831.zip
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 ?
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/unix/os.rs3
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)))
         }
     }
 }