summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2020-10-14 22:58:30 +0800
committerruki <[email protected]>2020-10-14 22:58:30 +0800
commite59261638698b8b1c8e340205a27026d16f4ea4c (patch)
treedb2fe5050e57caba8ca7991a6f098d844a847857 /core/src
parentd0439200afcde3b7c3acc3ee6eaa6dc8f79b689d (diff)
fix filelock bug
Diffstat (limited to 'core/src')
-rw-r--r--core/src/xmake/io/filelock_open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/xmake/io/filelock_open.c b/core/src/xmake/io/filelock_open.c
index 582c447cf..1cee501ed 100644
--- a/core/src/xmake/io/filelock_open.c
+++ b/core/src/xmake/io/filelock_open.c
@@ -50,7 +50,7 @@ tb_int_t xm_io_filelock_open(lua_State* lua)
tb_long_t tryn = 2;
tb_filelock_ref_t lock = tb_null;
while (!lock && tryn-- > 0)
- lock = tb_filelock_init_from_path(path, tb_file_info(path, tb_null)? TB_FILE_MODE_RO : TB_FILE_MODE_RW | TB_FILE_MODE_CREAT);
+ lock = tb_filelock_init_from_path(path, tb_file_info(path, tb_null)? TB_FILE_MODE_RW : TB_FILE_MODE_RW | TB_FILE_MODE_CREAT);
if (lock) xm_lua_pushpointer(lua, (tb_pointer_t)lock);
else lua_pushnil(lua);
return 1;