summaryrefslogtreecommitdiff
path: root/xmake/core/base/os.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-09-05 00:57:17 +0800
committerruki <[email protected]>2024-09-05 00:57:17 +0800
commit32cabe08be37cbc98d02a81076cbe8fe2fadda9b (patch)
tree165d7fd9602815ca49cbbcee449a5b1a25745030 /xmake/core/base/os.lua
parentf612170737b5a34828e79f84edf953ebb8b71be9 (diff)
add writeable for os.cp #5138
Diffstat (limited to 'xmake/core/base/os.lua')
-rw-r--r--xmake/core/base/os.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index 2dba50509..6a1151e23 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -70,6 +70,7 @@ function os._cp(src, dst, rootdir, opt)
-- is file or link?
local symlink = opt.symlink
+ local writeable = opt.writeable
if os.isfile(src) or (symlink and os.islink(src)) then
-- the destination is directory? append the filename
@@ -85,7 +86,7 @@ function os._cp(src, dst, rootdir, opt)
if opt.force and os.isfile(dst) then
os.rmfile(dst)
end
- if not os.cpfile(src, dst, symlink) then
+ if not os.cpfile(src, dst, symlink, writeable) then
local errors = os.strerror()
if symlink and os.islink(src) then
local reallink = os.readlink(src)