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
parent
71c5aab3e7
commit
117d15ed7a
|
@ -136,7 +136,7 @@ pub fn OpenFileW(
|
|||
.SecurityQualityOfService = null,
|
||||
};
|
||||
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;
|
||||
while (true) {
|
||||
|
|
Loading…
Reference in New Issue