Skip to content

Commit

Permalink
replace old sep
Browse files Browse the repository at this point in the history
  • Loading branch information
OpportunityLiu committed Jul 17, 2019
1 parent 5c83ebc commit 0e8efd4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions xmake/plugins/project/vstudio/impl/vs201x.lua
Expand Up @@ -165,6 +165,9 @@ function _make_vsinfo_modes()
local vsinfo_modes = {}
local modes = option.get("modes")
if modes then
if not modes:find("\"") then
modes = modes:gsub(",", path.envsep())
end
for _, mode in ipairs(path.splitenv(modes)) do
table.insert(vsinfo_modes, mode:trim())
end
Expand All @@ -181,6 +184,9 @@ function _make_vsinfo_archs()
local vsinfo_archs = {}
local archs = option.get("archs")
if archs then
if not archs:find("\"") then
archs = archs:gsub(",", path.envsep())
end
for _, arch in ipairs(path.splitenv(archs)) do
table.insert(vsinfo_archs, arch:trim())
end
Expand Down
6 changes: 6 additions & 0 deletions xmake/plugins/project/vsxmake/getinfo.lua
Expand Up @@ -129,6 +129,9 @@ function _make_vsinfo_modes()
local vsinfo_modes = {}
local modes = option.get("modes")
if modes then
if not modes:find("\"") then
modes = modes:gsub(",", path.envsep())
end
for _, mode in ipairs(path.splitenv(modes)) do
table.insert(vsinfo_modes, mode:trim())
end
Expand All @@ -145,6 +148,9 @@ function _make_vsinfo_archs()
local vsinfo_archs = {}
local archs = option.get("archs")
if archs then
if not archs:find("\"") then
archs = archs:gsub(",", path.envsep())
end
for _, arch in ipairs(path.splitenv(archs)) do
table.insert(vsinfo_archs, arch:trim())
end
Expand Down
2 changes: 1 addition & 1 deletion xmake/plugins/project/vsxmake/vsxmake.lua
Expand Up @@ -67,7 +67,7 @@ function _escape(str)
str = str:sub(#("$(XmakeProjectDir)") + 1)
end

str = (string.gsub(str, "[%%%$@'\";%?%*]", function (c) return assert(map[c]) end))
str = (string.gsub(str, "[%%%$@';%?%*]", function (c) return assert(map[c]) end))
if has_prefix then
str = "$(XmakeProjectDir)" .. str
end
Expand Down

0 comments on commit 0e8efd4

Please sign in to comment.