diff options
| author | bors <bors@rust-lang.org> | 2015-02-25 20:32:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-25 20:32:58 +0000 |
| commit | 4db0b32467535d718d6474de7ae8d1007d900818 (patch) | |
| tree | 85c3f0131e2347eb2c0b2931a6c41284a52aaa1b /src/libstd/sys/windows/process2.rs | |
| parent | 880fb89bde126aa43fc348d0b93839d3d18a1f51 (diff) | |
| parent | 357b41bfcfcfd902d842a20f2c5858b8e196495d (diff) | |
| download | rust-4db0b32467535d718d6474de7ae8d1007d900818.tar.gz rust-4db0b32467535d718d6474de7ae8d1007d900818.zip | |
Auto merge of #22796 - Manishearth:rollup, r=Manishearth
Diffstat (limited to 'src/libstd/sys/windows/process2.rs')
| -rw-r--r-- | src/libstd/sys/windows/process2.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libstd/sys/windows/process2.rs b/src/libstd/sys/windows/process2.rs index 19e38196d19..d4c6e85489f 100644 --- a/src/libstd/sys/windows/process2.rs +++ b/src/libstd/sys/windows/process2.rs @@ -16,16 +16,15 @@ use collections; use env; use ffi::{OsString, OsStr}; use fmt; +use fs; use io::{self, Error}; use libc::{self, c_void}; -use old_io::fs; -use old_path; use os::windows::OsStrExt; use ptr; use sync::{StaticMutex, MUTEX_INIT}; +use sys::handle::Handle; use sys::pipe2::AnonPipe; use sys::{self, cvt}; -use sys::handle::Handle; use sys_common::{AsInner, FromInner}; //////////////////////////////////////////////////////////////////////////////// @@ -142,9 +141,8 @@ impl Process { for path in split_paths(&v) { let path = path.join(cfg.program.to_str().unwrap()) .with_extension(env::consts::EXE_EXTENSION); - // FIXME: update with new fs module once it lands - if fs::stat(&old_path::Path::new(&path)).is_ok() { - return Some(OsString::from_str(path.as_str().unwrap())) + if fs::metadata(&path).is_ok() { + return Some(path.into_os_string()) } } break |
