diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 548782216bbe5..96717a38cba93 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -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}; diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs index d9d1a37465140..80cdf9782f20f 100644 --- a/src/libstd/sys/windows/fs.rs +++ b/src/libstd/sys/windows/fs.rs @@ -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<()> {