]> git.lizzy.rs Git - rust.git/commitdiff
wrmdir -> RemoveDirectoryW
authorPeter Atashian <retep998@gmail.com>
Mon, 26 Jan 2015 04:00:21 +0000 (23:00 -0500)
committerPeter Atashian <retep998@gmail.com>
Mon, 26 Jan 2015 04:00:21 +0000 (23:00 -0500)
Signed-off-by: Peter Atashian <retep998@gmail.com>
src/liblibc/lib.rs
src/libstd/sys/windows/fs.rs

index a07fd61cd8c34cd95d1e3ff93c2d856d892866b7..2380bc7a752432607664949e58b2ef93c34cfb40 100644 (file)
 #[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};
 
index cb8ef7eb66bc414d30658135feef4d382a213930..bdcbcdfb8679cc486f65508e077d97caadaf31ce 100644 (file)
@@ -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<()> {