| ... | ... | @@ -2133,7 +2133,7 @@ pub fn dirOpenFileWtf16( |
| 2133 | 2133 | // incorrectly returned for an indeterminate amount of time |
| 2134 | 2134 | // after an executable file is closed. Here we work around the |
| 2135 | 2135 | // kernel bug with retry attempts. |
| 2136 | | if (attempt - max_attempts == 0) return error.SharingViolation; |
| 2136 | if (max_attempts - attempt == 0) return error.SharingViolation; |
| 2137 | 2137 | _ = w.kernel32.SleepEx((@as(u32, 1) << attempt) >> 1, w.TRUE); |
| 2138 | 2138 | attempt += 1; |
| 2139 | 2139 | continue; |
| ... | ... | @@ -2153,7 +2153,7 @@ pub fn dirOpenFileWtf16( |
| 2153 | 2153 | // finished with the deletion operation, and so this CreateFile |
| 2154 | 2154 | // call has failed. Here, we simulate the kernel bug being |
| 2155 | 2155 | // fixed by sleeping and retrying until the error goes away. |
| 2156 | | if (attempt - max_attempts == 0) return error.SharingViolation; |
| 2156 | if (max_attempts - attempt == 0) return error.SharingViolation; |
| 2157 | 2157 | _ = w.kernel32.SleepEx((@as(u32, 1) << attempt) >> 1, w.TRUE); |
| 2158 | 2158 | attempt += 1; |
| 2159 | 2159 | continue; |