diff options
| author | ruki <[email protected]> | 2024-09-05 17:15:02 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-09-05 17:15:02 +0800 |
| commit | e9df84ad021c7c8ec020384e250ca5b95fe3e700 (patch) | |
| tree | 3986286cf9b04a0340ca413c01ad242214957ea1 /core/src | |
| parent | a3f50282bfed783a402b7d97485820ca8ceb0691 (diff) | |
| parent | ee4935050a6165e1da500731fb00f3b08265c266 (diff) | |
Merge pull request #5570 from xmake-io/cpfile
Improve to copy file
Diffstat (limited to 'core/src')
| m--------- | core/src/tbox/tbox | 0 | ||||
| -rw-r--r-- | core/src/xmake/os/cpfile.c | 4 |
2 files changed, 4 insertions, 0 deletions
diff --git a/core/src/tbox/tbox b/core/src/tbox/tbox -Subproject 57e57a3271ad925936b3fbf37877f9eceb49ee4 +Subproject e222f61667fdafb9189849d2970c01e13940b0b diff --git a/core/src/xmake/os/cpfile.c b/core/src/xmake/os/cpfile.c index 153f51de0..06184cf21 100644 --- a/core/src/xmake/os/cpfile.c +++ b/core/src/xmake/os/cpfile.c @@ -49,6 +49,10 @@ tb_int_t xm_os_cpfile(lua_State* lua) if (is_symlink) flags |= TB_FILE_COPY_LINK; + tb_bool_t is_writeable = lua_toboolean(lua, 4); + if (is_writeable) + flags |= TB_FILE_COPY_WRITEABLE; + // do copy lua_pushboolean(lua, tb_file_copy(src, dst, flags)); return 1; |
