aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflysand7 <thebumboni@gmail.com>2024-01-26 09:07:12 +1100
committerflysand7 <thebumboni@gmail.com>2024-01-26 09:07:12 +1100
commitd5b0ec712beaa8ffb5cce4b6ea655048c4af8d1f (patch)
treeb1d05cca6567e98c2513a5f8d0284ff61f883302
parentaf636eedde57c4c891dff7344063253b268404f3 (diff)
os/os2: Remove file attribute casting from core:os2
-rw-r--r--core/os/os2/file_windows.odin8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/os/os2/file_windows.odin b/core/os/os2/file_windows.odin
index 600ecde21..7c31defe9 100644
--- a/core/os/os2/file_windows.odin
+++ b/core/os/os2/file_windows.odin
@@ -454,7 +454,7 @@ _remove :: proc(name: string) -> Error {
if err != err1 {
a := win32.GetFileAttributesW(p)
- if a == ~u32(0) {
+ if a == win32.INVALID_FILE_ATTRIBUTES {
err = _get_platform_error()
} else {
if a & win32.FILE_ATTRIBUTE_DIRECTORY != 0 {
@@ -704,13 +704,13 @@ _fchtimes :: proc(f: ^File, atime, mtime: time.Time) -> Error {
_exists :: proc(path: string) -> bool {
wpath := _fix_long_path(path)
attribs := win32.GetFileAttributesW(wpath)
- return i32(attribs) != win32.INVALID_FILE_ATTRIBUTES
+ return attribs != win32.INVALID_FILE_ATTRIBUTES
}
_is_file :: proc(path: string) -> bool {
wpath := _fix_long_path(path)
attribs := win32.GetFileAttributesW(wpath)
- if i32(attribs) != win32.INVALID_FILE_ATTRIBUTES {
+ if attribs != win32.INVALID_FILE_ATTRIBUTES {
return attribs & win32.FILE_ATTRIBUTE_DIRECTORY == 0
}
return false
@@ -719,7 +719,7 @@ _is_file :: proc(path: string) -> bool {
_is_dir :: proc(path: string) -> bool {
wpath := _fix_long_path(path)
attribs := win32.GetFileAttributesW(wpath)
- if i32(attribs) != win32.INVALID_FILE_ATTRIBUTES {
+ if attribs != win32.INVALID_FILE_ATTRIBUTES {
return attribs & win32.FILE_ATTRIBUTE_DIRECTORY != 0
}
return false