| author | |
| committer | |
| log | 8bec1304c35585ceacfbda3696d8af854c7ab08a |
| tree | 9b2eb09c7f922e87b9fe436be73999aa715514f5 |
| parent | 113b217593ab5b0369b76251b99a195f361cc220 |
2 files changed, 4 insertions(+), 2 deletions(-)
lib/std/os.zig+1-1| ... | ... | @@ -1651,7 +1651,7 @@ pub fn renameatW( |
| 1651 | 1651 | ReplaceIfExists: windows.BOOLEAN, |
| 1652 | 1652 | ) RenameError!void { |
| 1653 | 1653 | const access_mask = windows.SYNCHRONIZE | windows.GENERIC_WRITE | windows.DELETE; |
| 1654 | const src_fd = try windows.OpenFileW(old_dir_fd, old_path, null, access_mask, windows.FILE_OPEN); | |
| 1654 | const src_fd = try windows.OpenFileW(old_dir_fd, old_path, null, access_mask, null, windows.FILE_OPEN); | |
| 1655 | 1655 | defer windows.CloseHandle(src_fd); |
| 1656 | 1656 | |
| 1657 | 1657 | const struct_buf_len = @sizeOf(windows.FILE_RENAME_INFORMATION) + (MAX_PATH_BYTES - 1); |
lib/std/os/windows.zig+3-1| ... | ... | @@ -107,6 +107,7 @@ pub fn OpenFileW( |
| 107 | 107 | sub_path_w: [*:0]const u16, |
| 108 | 108 | sa: ?*SECURITY_ATTRIBUTES, |
| 109 | 109 | access_mask: ACCESS_MASK, |
| 110 | share_access_opt: ?ULONG, | |
| 110 | 111 | creation: ULONG, |
| 111 | 112 | ) OpenError!HANDLE { |
| 112 | 113 | if (sub_path_w[0] == '.' and sub_path_w[1] == 0) { |
| ... | ... | @@ -135,6 +136,7 @@ pub fn OpenFileW( |
| 135 | 136 | .SecurityQualityOfService = null, |
| 136 | 137 | }; |
| 137 | 138 | var io: IO_STATUS_BLOCK = undefined; |
| 139 | const share_access = share_access_opt orelse FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE; | |
| 138 | 140 | const rc = ntdll.NtCreateFile( |
| 139 | 141 | &result, |
| 140 | 142 | access_mask, |
| ... | ... | @@ -142,7 +144,7 @@ pub fn OpenFileW( |
| 142 | 144 | &io, |
| 143 | 145 | null, |
| 144 | 146 | FILE_ATTRIBUTE_NORMAL, |
| 145 | FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, | |
| 147 | share_access, | |
| 146 | 148 | creation, |
| 147 | 149 | FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, |
| 148 | 150 | null, |