Make O_RDONLY default for os.open on all platforms.

And also moved Windows file procs to `os_windows.odin`, in line with all the other platforms who didn't have a dedicated `file_<platform>.odin`
This commit is contained in:
Jeroen van Rijn
2024-11-28 15:57:48 +01:00
parent bb96e54308
commit 8581240ece
3 changed files with 579 additions and 588 deletions
+1 -1
View File
@@ -679,7 +679,7 @@ get_last_error_string :: proc() -> string {
@(require_results)
open :: proc(path: string, flags: int = O_RDWR, mode: int = 0) -> (handle: Handle, err: Error) {
open :: proc(path: string, flags: int = O_RDONLY, mode: int = 0) -> (handle: Handle, err: Error) {
isDir := is_dir_path(path)
flags := flags
if isDir {