Fix windows breakage.

This commit is contained in:
Graydon Hoare 2012-09-28 16:35:20 -07:00
parent ad951b5976
commit 9b64d71848
1 changed files with 2 additions and 1 deletions

View File

@ -554,12 +554,13 @@ pub fn make_dir(p: &Path, mode: c_int) -> bool {
#[cfg(windows)]
fn mkdir(p: &Path, _mode: c_int) -> bool {
use win32::*;
// FIXME: turn mode into something useful? #2623
do as_utf16_p(p.to_str()) |buf| {
libc::CreateDirectoryW(buf, unsafe {
cast::reinterpret_cast(&0)
})
!= (0 as BOOL)
!= (0 as libc::BOOL)
}
}