Skip to content

Commit

Permalink
fix invalid path
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Aug 27, 2024
1 parent 9216042 commit 8dd37a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xmake/core/package/package.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8dd37a6

Please sign in to comment.