Skip to content

Commit

Permalink
Rollup merge of rust-lang#21640 - retep998:rmdir, r=alexcrichton
Browse files Browse the repository at this point in the history
`_wrmdir` is literally just a wrapper around `RemoveDirectoryW`, so let's just use `RemoveDirectoryW`.
r? @alexcrichton
  • Loading branch information
Manishearth committed Jan 28, 2015
2 parents be13211 + 8f38eae commit 0d1a4ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/liblibc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ pub use funcs::bsd43::{shutdown};
#[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};

Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/windows/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<()> {
Expand Down

0 comments on commit 0d1a4ac

Please sign in to comment.