Skip to content

Commit 3a7a8b6

Browse files
committed
---
yaml --- r: 6441 b: refs/heads/master c: d0a2f00 h: refs/heads/master i: 6439: a4b3205 v: v3
1 parent d9cd00b commit 3a7a8b6

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 9dd4789d80b1313bb39daa8c8973e63a60b07b94
2+
refs/heads/master: d0a2f00611cc1622cfcd18dda66206277e8e2176

trunk/src/lib/fs.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,11 @@ fn make_dir(p: path, mode: int) -> bool {
125125
ret mkdir(p, mode);
126126

127127
#[cfg(target_os = "win32")]
128-
fn mkdir(_p: path, _mode: int) -> bool {
128+
fn mkdir(_p: path, _mode: int) -> bool unsafe {
129129
// FIXME: turn mode into something useful?
130130
ret str::as_buf(_p, {|buf|
131-
os::kernel32::CreateDirectory(buf, ptr::null())
131+
os::kernel32::CreateDirectoryA(
132+
buf, unsafe::reinterpret_cast(0))
132133
});
133134
}
134135

@@ -167,7 +168,7 @@ fn remove_dir(p: path) -> bool {
167168

168169
#[cfg(target_os = "win32")]
169170
fn rmdir(_p: path) -> bool {
170-
ret str::as_buf(_p, {|buf| os::kernel32::RemoveDirectory(buf)});
171+
ret str::as_buf(_p, {|buf| os::kernel32::RemoveDirectoryA(buf)});
171172
}
172173

173174
#[cfg(target_os = "linux")]

trunk/src/lib/win32_os.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ native mod kernel32 {
5252
fn GetModuleFileNameA(hModule: HMODULE,
5353
lpFilename: LPTSTR,
5454
nSize: DWORD) -> DWORD;
55-
fn CreateDirectory(lpPathName: LPCTSTR,
56-
lpSecurityAttributes: LPSECURITY_ATTRIBUTES) -> bool;
57-
fn RemoveDirectory(lpPathName: LPCTSTR) -> bool;
55+
fn CreateDirectoryA(lpPathName: LPCTSTR,
56+
lpSecurityAttributes: LPSECURITY_ATTRIBUTES) -> bool;
57+
fn RemoveDirectoryA(lpPathName: LPCTSTR) -> bool;
5858
}
5959

6060
// FIXME turn into constants

0 commit comments

Comments
 (0)