Skip to content

Commit c8b2646

Browse files
authored
Update rt_utils.lua
添加了不删除源文件夹选项,因为不同安装包安装时有向同一个文件夹中安装文件的现象发生
1 parent 1ad52ff commit c8b2646

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tools/scripts/modules/rt/rt_utils.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,12 @@ function cp_with_symlink(srcpath, dstpath, opt)
7373
else
7474
option = opt or {symlink = true}
7575
end
76-
os.tryrm(dstpath)
77-
os.vcp(srcpath, dstpath, option)
76+
if (opt and opt.del == false) then
77+
os.execv("cp -r", {srcpath, dstpath})
78+
else
79+
os.tryrm(dstpath)
80+
os.vcp(srcpath, dstpath, option)
81+
end
7882
end
7983

8084
function dirsize(dir)

0 commit comments

Comments
 (0)