summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-06-04 23:31:30 +0800
committerruki <[email protected]>2021-06-04 23:31:30 +0800
commit625261e7ae7159259ac5cb9f4ae304b3ccbf9486 (patch)
tree98e4d320a4e9db98ddf12e15dbca251c1c6ae1bc
parente2140bb9755361127959d480bd60f2bcb0469cb1 (diff)
improve package
-rw-r--r--xmake/actions/package/local/main.lua4
-rw-r--r--xmake/actions/package/remote/main.lua2
2 files changed, 3 insertions, 3 deletions
diff --git a/xmake/actions/package/local/main.lua b/xmake/actions/package/local/main.lua
index 75c6b4d72..beaaa8862 100644
--- a/xmake/actions/package/local/main.lua
+++ b/xmake/actions/package/local/main.lua
@@ -32,7 +32,7 @@ function _package_binary(target)
-- get the output directory
local outputdir = option.get("outputdir") or config.buildir()
local packagename = target:name():lower()
- if bit.band(packagename:byte(2), 0xc0) == 0x80 then
+ if #packagename > 1 and bit.band(packagename:byte(2), 0xc0) == 0x80 then
wprint("package(%s): cannot generate package, becauese it contains unicode characters!", packagename)
return
end
@@ -88,7 +88,7 @@ function _package_library(target)
-- get the output directory
local outputdir = option.get("outputdir") or config.buildir()
local packagename = target:name():lower()
- if bit.band(packagename:byte(2), 0xc0) == 0x80 then
+ if #packagename > 1 and bit.band(packagename:byte(2), 0xc0) == 0x80 then
wprint("package(%s): cannot generate package, becauese it contains unicode characters!", packagename)
return
end
diff --git a/xmake/actions/package/remote/main.lua b/xmake/actions/package/remote/main.lua
index 0e8383890..064141b56 100644
--- a/xmake/actions/package/remote/main.lua
+++ b/xmake/actions/package/remote/main.lua
@@ -32,7 +32,7 @@ function _package_remote(target)
-- get the output directory
local outputdir = option.get("outputdir") or config.buildir()
local packagename = target:name():lower()
- if bit.band(packagename:byte(2), 0xc0) == 0x80 then
+ if #packagename > 1 and bit.band(packagename:byte(2), 0xc0) == 0x80 then
wprint("package(%s): cannot generate package, becauese it contains unicode characters!", packagename)
return
end