diff options
Diffstat (limited to 'core/src')
| m--------- | core/src/tbox/tbox | 0 | ||||
| -rw-r--r-- | core/src/xmake/os/cpfile.c | 8 |
2 files changed, 7 insertions, 1 deletions
diff --git a/core/src/tbox/tbox b/core/src/tbox/tbox -Subproject 4ab2cdf8dc94402d2277fd71ddc11eae913a30d +Subproject 6e4eab7e07a2b535af6889de3f62cfec0384e99 diff --git a/core/src/xmake/os/cpfile.c b/core/src/xmake/os/cpfile.c index 4490172da..153f51de0 100644 --- a/core/src/xmake/os/cpfile.c +++ b/core/src/xmake/os/cpfile.c @@ -43,7 +43,13 @@ tb_int_t xm_os_cpfile(lua_State* lua) tb_char_t const* dst = luaL_checkstring(lua, 2); tb_check_return_val(src && dst, 0); + // init copy flags + tb_size_t flags = TB_FILE_COPY_NONE; + tb_bool_t is_symlink = lua_toboolean(lua, 3); + if (is_symlink) + flags |= TB_FILE_COPY_LINK; + // do copy - lua_pushboolean(lua, tb_file_copy(src, dst)); + lua_pushboolean(lua, tb_file_copy(src, dst, flags)); return 1; } |
