Skip to content

Commit f50698b

Browse files
authored
updated file_windows.odin to follow coding conventions
1 parent dd0b8d5 commit f50698b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

core/os/os2/file_windows.odin

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,12 @@ _file_size :: proc(f: ^File_Impl) -> (n: i64, err: Error) {
508508
length: win32.LARGE_INTEGER
509509
handle := _handle(&f.file)
510510
if f.kind == .Pipe {
511-
bytesAvail: u32
512-
if win32.PeekNamedPipe(handle, nil, 0, nil, &bytesAvail, nil) {
513-
return i64(bytesAvail), nil
511+
bytes_available: u32
512+
if win32.PeekNamedPipe(handle, nil, 0, nil, &bytes_available, nil) {
513+
return i64(bytes_available), nil
514514
} else {
515-
return 0, .No_Size
515+
err = _get_platform_error()
516+
return
516517
}
517518
}
518519
if !win32.GetFileSizeEx(handle, &length) {

0 commit comments

Comments
 (0)