mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Fixed issues with dir opening on macOS
This commit is contained in:
@@ -350,6 +350,7 @@ open :: proc(path: string, flags: int = O_RDWR, mode: int = 0) -> (Handle, Errno
|
|||||||
|
|
||||||
when ODIN_OS == .Darwin && ODIN_ARCH == .arm64 {
|
when ODIN_OS == .Darwin && ODIN_ARCH == .arm64 {
|
||||||
if mode != 0 {
|
if mode != 0 {
|
||||||
|
if mode != 0 && !is_dir_handle(handle) {
|
||||||
err := fchmod(handle, cast(u16)mode)
|
err := fchmod(handle, cast(u16)mode)
|
||||||
if err != 0 {
|
if err != 0 {
|
||||||
_unix_close(handle)
|
_unix_close(handle)
|
||||||
|
|||||||
Reference in New Issue
Block a user