From d1499f3f78e1f65e164fcf68ade937aa46f8943b Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 16 May 2022 13:57:12 -0400 Subject: [PATCH] make -vet happy --- core/os/os2/file_linux.odin | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/os/os2/file_linux.odin b/core/os/os2/file_linux.odin index 8698ee54d..0f2e810f4 100644 --- a/core/os/os2/file_linux.odin +++ b/core/os/os2/file_linux.odin @@ -370,6 +370,9 @@ _is_file :: proc(name: string) -> bool { } s: _Stat res := unix.sys_stat(name_cstr, &s) + if res < 0 { + return false + } return S_ISREG(s.mode) } @@ -389,6 +392,9 @@ _is_dir :: proc(name: string) -> bool { } s: _Stat res := unix.sys_stat(name_cstr, &s) + if res < 0 { + return false + } return S_ISDIR(s.mode) }