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.
master
LeRoyce Pearson 2020-04-07 16:49:37 -06:00
parent 71c5aab3e7
commit 117d15ed7a
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ pub fn OpenFileW(
.SecurityQualityOfService = null, .SecurityQualityOfService = null,
}; };
var io: IO_STATUS_BLOCK = undefined; var io: IO_STATUS_BLOCK = undefined;
const share_access = share_access_opt orelse FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE; const share_access = share_access_opt orelse (FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE);
var delay: usize = 1; var delay: usize = 1;
while (true) { while (true) {