Skip to content

Commit ed1f992

Browse files
committed
Fix default open mode in redbean unix.open()
1 parent 7d2c363 commit ed1f992

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

third_party/lua/lunix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ static int LuaUnixOpen(lua_State *L) {
10081008
return SysretInteger(
10091009
L, "open", olderr,
10101010
openat(luaL_optinteger(L, 4, AT_FDCWD), luaL_checkstring(L, 1),
1011-
luaL_optinteger(L, 2, O_RDONLY), luaL_optinteger(L, 3, 0)));
1011+
luaL_optinteger(L, 2, O_RDONLY), luaL_optinteger(L, 3, 0644)));
10121012
}
10131013

10141014
// unix.tmpfd()

0 commit comments

Comments
 (0)