summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-08-28 00:28:09 +0800
committerruki <[email protected]>2024-08-27 20:49:33 +0800
commit8dd37a697c4cb22223908adab6937f464f5caeda (patch)
treed283315feeca8e89ff66bf249938f8ef770514d1
parent92160428900e8ee1cb7fc288c4df8fa69a3426a1 (diff)
fix invalid path
-rw-r--r--xmake/core/package/package.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index cf5e8068c..fe22a2e8b 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -785,7 +785,7 @@ function _instance:cachedir()
local version_str = self:version_str()
-- strip invalid characters on windows, e.g. `>= <=`
if os.is_host("windows") then
- version_str = version_str:gsub("[>=<]", "")
+ version_str = version_str:gsub("[>=<|%*]", "")
end
if self:is_local() then
cachedir = path.join(config.buildir({absolute = true}), ".packages", name:sub(1, 1):lower(), name, version_str, "cache")
@@ -814,7 +814,7 @@ function _instance:installdir(...)
if version_str then
-- strip invalid characters on windows, e.g. `>= <=`
if os.is_host("windows") then
- version_str = version_str:gsub("[>=<]", "")
+ version_str = version_str:gsub("[>=<|%*]", "")
end
installdir = path.join(installdir, version_str)
end