summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2022-03-10 00:54:46 +0800
committerruki <[email protected]>2022-03-10 00:54:46 +0800
commit01afb1c8e997a4ce98bf107393101ea4cbb7e26b (patch)
tree54181e7e2848c716db9fe5a92607ab5f40b6d352 /core/src
parent64db618a134e8a474f4d785ee47cf04723f782ef (diff)
improve path.translate
Diffstat (limited to 'core/src')
m---------core/src/tbox/tbox0
-rw-r--r--core/src/xmake/path/translate.c10
2 files changed, 5 insertions, 5 deletions
diff --git a/core/src/tbox/tbox b/core/src/tbox/tbox
-Subproject 19a1e565216e9797c3c145d2db176d54c27991c
+Subproject 1c62c6d02cc76681e715dbfdb755901379942c2
diff --git a/core/src/xmake/path/translate.c b/core/src/xmake/path/translate.c
index 87059c85c..3074c0b2a 100644
--- a/core/src/xmake/path/translate.c
+++ b/core/src/xmake/path/translate.c
@@ -43,20 +43,20 @@ tb_int_t xm_path_translate(lua_State* lua)
tb_char_t const* path = luaL_checklstring(lua, 1, &path_size);
tb_check_return_val(path, 0);
- // get the option argument, e.g. {reduce_dot2 = true}
- tb_bool_t reduce_dot2 = tb_false;
+ // get the option argument, e.g. {normalize = true}
+ tb_bool_t normalize = tb_false;
if (lua_istable(lua, 2))
{
- lua_pushstring(lua, "reduce_dot2");
+ lua_pushstring(lua, "normalize");
lua_gettable(lua, 2);
if (lua_toboolean(lua, -1))
- reduce_dot2 = tb_true;
+ normalize = tb_true;
lua_pop(lua, 1);
}
// do path:translate()
tb_char_t data[TB_PATH_MAXN];
- tb_size_t size = tb_path_translate_to(path, (tb_size_t)path_size, data, sizeof(data), reduce_dot2);
+ tb_size_t size = tb_path_translate_to(path, (tb_size_t)path_size, data, sizeof(data), normalize);
if (size) lua_pushlstring(lua, data, (size_t)size);
else lua_pushnil(lua);
return 1;