diff options
| author | ruki <[email protected]> | 2018-05-02 23:25:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-05-02 14:35:58 +0800 |
| commit | 4bda9b04b16460c93f6342a17c93cf07f191b7cc (patch) | |
| tree | b2aafa6646ec79db030fe71f056cc64c8d326e0c /core/src/xmake | |
| parent | cb8d8dcf2b7a698e7a6c31f1e58722b505132f32 (diff) | |
improve os.match
Diffstat (limited to 'core/src/xmake')
| -rw-r--r-- | core/src/xmake/os/find.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/xmake/os/find.c b/core/src/xmake/os/find.c index 79f281f2b..194494f0b 100644 --- a/core/src/xmake/os/find.c +++ b/core/src/xmake/os/find.c @@ -180,8 +180,8 @@ tb_int_t xm_os_find(lua_State* lua) tb_char_t const* pattern = luaL_checkstring(lua, 2); tb_check_return_val(pattern, 0); - // is recurse? - tb_bool_t recurse = lua_toboolean(lua, 3); + // the recursion level + tb_long_t recursion = lua_tointeger(lua, 3); // the match mode tb_long_t mode = lua_tointeger(lua, 4); @@ -198,7 +198,7 @@ tb_int_t xm_os_find(lua_State* lua) tuple[1].cstr = pattern; tuple[2].l = mode; tuple[3].ul = 0; - tb_directory_walk(rootdir, recurse, tb_true, xm_os_find_walk, tuple); + tb_directory_walk(rootdir, recursion, tb_true, xm_os_find_walk, tuple); // pop string package lua_pop(lua, 1); |
