提交 0d1a4ac2 编写于 作者: M Manish Goregaokar

Rollup merge of #21640 - retep998:rmdir, r=alexcrichton

`_wrmdir` is literally just a wrapper around `RemoveDirectoryW`, so let's just use `RemoveDirectoryW`.
r? @alexcrichton 
......@@ -273,6 +273,7 @@
#[cfg(windows)] pub use funcs::extra::kernel32::{GetOverlappedResult, ConnectNamedPipe};
#[cfg(windows)] pub use funcs::extra::kernel32::{DisconnectNamedPipe, OpenProcess};
#[cfg(windows)] pub use funcs::extra::kernel32::{MoveFileExW, VirtualProtect};
#[cfg(windows)] pub use funcs::extra::kernel32::{RemoveDirectoryW};
#[cfg(windows)] pub use funcs::extra::msvcrt::{get_osfhandle, open_osfhandle};
#[cfg(windows)] pub use funcs::extra::winsock::{ioctlsocket};
......
......@@ -342,7 +342,7 @@ pub fn chmod(p: &Path, mode: uint) -> IoResult<()> {
pub fn rmdir(p: &Path) -> IoResult<()> {
let p = try!(to_utf16(p));
mkerr_libc(unsafe { libc::wrmdir(p.as_ptr()) })
super::mkerr_winbool(unsafe { libc::RemoveDirectoryW(p.as_ptr()) })
}
pub fn chown(_p: &Path, _uid: int, _gid: int) -> IoResult<()> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册