summaryrefslogtreecommitdiff
path: root/xmake/core/base/os.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-08-28 22:29:23 +0800
committerruki <[email protected]>2018-08-28 08:56:22 +0800
commit38af3ecd45ca1c806a584a9b49eb442e3ac21dcb (patch)
treee29f14d422a967510785406537380d7962d19dd4 /xmake/core/base/os.lua
parent5fc12f30a2eb4193ff68b08061d3cf46a0415a5c (diff)
add path.islastsep
Diffstat (limited to 'xmake/core/base/os.lua')
-rw-r--r--xmake/core/base/os.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index fd6ca4234..d699d8fa6 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -52,7 +52,7 @@ function os._cp(src, dst)
if os.isfile(src) then
-- the destination is directory? append the filename
- if os.isdir(dst) or dst:endswith(path.seperator()) then
+ if os.isdir(dst) or path.islastsep(dst) then
dst = path.join(dst, path.filename(src))
end
@@ -64,7 +64,7 @@ function os._cp(src, dst)
elseif os.isdir(src) then
-- the destination directory exists? append the filename
- if os.isdir(dst) or dst:endswith(path.seperator()) then
+ if os.isdir(dst) or path.islastsep(dst) then
dst = path.join(dst, path.filename(path.translate(src)))
end
@@ -92,7 +92,7 @@ function os._mv(src, dst)
if os.exists(src) then
-- the destination directory exists? append the filename
- if os.isdir(dst) or dst:endswith(path.seperator()) then
+ if os.isdir(dst) or path.islastsep(dst) then
dst = path.join(dst, path.filename(path.translate(src)))
end