os/os2: add default permissions to write_entire_file

This commit is contained in:
Laytan Laats
2024-10-07 22:31:43 +02:00
parent 4b8462aa70
commit 6bf70b60d6

View File

@@ -164,7 +164,7 @@ read_entire_file_from_file :: proc(f: ^File, allocator: runtime.Allocator) -> (d
}
@(require_results)
write_entire_file :: proc(name: string, data: []byte, perm: int, truncate := true) -> Error {
write_entire_file :: proc(name: string, data: []byte, perm: int = 0o644, truncate := true) -> Error {
flags := O_WRONLY|O_CREATE
if truncate {
flags |= O_TRUNC