Merge pull request #5100 from herohiralal/patch-1

Convention-related changes in `file_windows.odin`
This commit is contained in:
Jeroen van Rijn
2025-04-30 22:27:59 +02:00
committed by GitHub
+5 -4
View File
@@ -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) {