| author | |
| committer | |
| log | a82d7c20631b90de2f2298d351353041ac41650d |
| tree | ea10e8411448e594c15366657a7200e9b2bcb835 |
| parent | 44a6172edbf6c99f4ebfeabb530756ed2a40c3c2 |
I encountered this error today when testing the self-hosted compiler on
Windows.4 files changed, 10 insertions(+), 0 deletions(-)
lib/std/os.zig+4| ... | ... | @@ -953,6 +953,10 @@ pub const WriteError = error{ |
| 953 | 953 | OperationAborted, |
| 954 | 954 | NotOpenForWriting, |
| 955 | 955 | |
| 956 | /// The process cannot access the file because another process has locked | |
| 957 | /// a portion of the file. Windows-only. | |
| 958 | LockViolation, | |
| 959 | ||
| 956 | 960 | /// This error occurs when no global event loop is configured, |
| 957 | 961 | /// and reading from the file descriptor would block. |
| 958 | 962 | WouldBlock, |
lib/std/os/windows.zig+4| ... | ... | @@ -517,6 +517,9 @@ pub const WriteFileError = error{ |
| 517 | 517 | OperationAborted, |
| 518 | 518 | BrokenPipe, |
| 519 | 519 | NotOpenForWriting, |
| 520 | /// The process cannot access the file because another process has locked | |
| 521 | /// a portion of the file. | |
| 522 | LockViolation, | |
| 520 | 523 | Unexpected, |
| 521 | 524 | }; |
| 522 | 525 | |
| ... | ... | @@ -597,6 +600,7 @@ pub fn WriteFile( |
| 597 | 600 | .IO_PENDING => unreachable, |
| 598 | 601 | .BROKEN_PIPE => return error.BrokenPipe, |
| 599 | 602 | .INVALID_HANDLE => return error.NotOpenForWriting, |
| 603 | .LOCK_VIOLATION => return error.LockViolation, | |
| 600 | 604 | else => |err| return unexpectedError(err), |
| 601 | 605 | } |
| 602 | 606 | } |
src/link.zig+1| ... | ... | @@ -435,6 +435,7 @@ pub const File = struct { |
| 435 | 435 | EmitFail, |
| 436 | 436 | NameTooLong, |
| 437 | 437 | CurrentWorkingDirectoryUnlinked, |
| 438 | LockViolation, | |
| 438 | 439 | }; |
| 439 | 440 | |
| 440 | 441 | /// Called from within the CodeGen to lower a local variable instantion as an unnamed |
src/main.zig+1| ... | ... | @@ -4227,6 +4227,7 @@ const FmtError = error{ |
| 4227 | 4227 | NotOpenForWriting, |
| 4228 | 4228 | UnsupportedEncoding, |
| 4229 | 4229 | ConnectionResetByPeer, |
| 4230 | LockViolation, | |
| 4230 | 4231 | } || fs.File.OpenError; |
| 4231 | 4232 | |
| 4232 | 4233 | fn fmtPath(fmt: *Fmt, file_path: []const u8, check_mode: bool, dir: fs.Dir, sub_path: []const u8) FmtError!void { |