Explorar el Código

updated `file_windows.odin` to follow coding conventions

Rohan Jadav hace 4 meses
padre
commit
f50698b901
Se han modificado 1 ficheros con 5 adiciones y 4 borrados
  1. 5 4
      core/os/os2/file_windows.odin

+ 5 - 4
core/os/os2/file_windows.odin

@@ -508,11 +508,12 @@ _file_size :: proc(f: ^File_Impl) -> (n: i64, err: Error) {
 	length: win32.LARGE_INTEGER
 	handle := _handle(&f.file)
 	if f.kind == .Pipe {
-		bytesAvail: u32
-		if win32.PeekNamedPipe(handle, nil, 0, nil, &bytesAvail, nil) {
-			return i64(bytesAvail), nil
+		bytes_available: u32
+		if win32.PeekNamedPipe(handle, nil, 0, nil, &bytes_available, nil) {
+			return i64(bytes_available), nil
 		} else {
-			return 0, .No_Size
+			err = _get_platform_error()
+			return
 		}
 	}
 	if !win32.GetFileSizeEx(handle, &length) {