소스 검색

Fixed issues with dir opening on macOS

Platin21 2 년 전
부모
커밋
cdeeeafc3f
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      core/os/os_darwin.odin

+ 1 - 0
core/os/os_darwin.odin

@@ -350,6 +350,7 @@ open :: proc(path: string, flags: int = O_RDWR, mode: int = 0) -> (Handle, Errno
 
 when  ODIN_OS == .Darwin && ODIN_ARCH == .arm64 {
 	if mode != 0 {
+	if mode != 0 && !is_dir_handle(handle) {
 		err := fchmod(handle, cast(u16)mode)
 		if err != 0 {
 			_unix_close(handle)