diff options
| author | ruki <[email protected]> | 2022-08-31 22:44:00 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-08-31 22:44:00 +0800 |
| commit | 23f93ac88e0484178a37c01b6e33298c95e3b64c (patch) | |
| tree | 11d6b8ebb790e88cc9982f05346f0e15cd5297f8 | |
| parent | 44d9b7cd8ef84a84bd8d898dddc419c385e02daf (diff) | |
update tbox
| m--------- | core/src/tbox/tbox | 0 | ||||
| -rw-r--r-- | xmake/core/base/os.lua | 8 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/src/tbox/tbox b/core/src/tbox/tbox -Subproject 6e4eab7e07a2b535af6889de3f62cfec0384e99 +Subproject f336b0d24f667825e8e3f439180ab5dcb0bab0d diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index ad33699f4..b67a497d1 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -67,8 +67,9 @@ function os._cp(src, dst, rootdir, opt) end end - -- is file? - if os.isfile(src) or os.islink(src) then + -- is file or link? + local symlink = opt and opt.symlink + if os.isfile(src) or (symlink and os.islink(src)) then -- the destination is directory? append the filename if os.isdir(dst) or path.islastsep(dst) then @@ -80,7 +81,6 @@ function os._cp(src, dst, rootdir, opt) end -- copy or link file - local symlink = opt and opt.symlink if not os.cpfile(src, dst, symlink) then local errors = os.strerror() if symlink and os.islink(src) then @@ -103,7 +103,7 @@ function os._cp(src, dst, rootdir, opt) end -- copy directory - if not os.cpdir(src, dst) then + if not os.cpdir(src, dst, symlink) then return false, string.format("cannot copy directory %s to %s, %s", src, dst, os.strerror()) end |
