authorgravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-04-07 16:49:37-06:00
committergravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-04-07 16:49:37-06:00
log117d15ed7a230d065cf88faa8156c08f7160e08b
tree024eb7846cca4ebc82d6c46b0300a621ca44c5c2
parent71c5aab3e740c131e63766be57de19b3dd451972

Fix file locking on windows

The share_access bitfield was being ORed with what was supposed to be parts of the default value, meaning that the share_access would be more permissive than expected.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/os/windows.zig+1-1
......@@ -136,7 +136,7 @@ pub fn OpenFileW(
136136 .SecurityQualityOfService = null,
137137 };
138138 var io: IO_STATUS_BLOCK = undefined;
139 const share_access = share_access_opt orelse FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE;
139 const share_access = share_access_opt orelse (FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE);
140140
141141 var delay: usize = 1;
142142 while (true) {