Skip to content

Commit 465e8f3

Browse files
committed
Windows/Sim: fixing pure Lua plugins in lua_51 directory
1 parent 822337c commit 465e8f3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

platform/resources/CoronaBuilderPluginCollector.lua

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ function PluginCollectorSolar2DDirectory:collect(destination, plugin, pluginTabl
165165
hasPlatform = hasPlatform or vFoundObject[i] == pluginPlatform
166166
end
167167
if not hasPlatform then
168-
log("Solar2D Directory: skipped plugin " .. plugin .. " because platform " .. pluginPlatform .. " is not supported")
169-
return params.canSkip
168+
if params.canSkip then
169+
log("Solar2D Directory: skipped plugin " .. plugin .. " because platform " .. pluginPlatform .. " is not supported")
170+
end
171+
return params.canSkip or "Solar2D Directory: skipped plugin " .. plugin .. " because platform " .. pluginPlatform .. " is not supported"
170172
end
171173
local repoName = pluginObject.p or (pluginTable.publisherId .. '-' .. plugin)
172174
local downloadURL = "https://github.com/" .. repoOwner .. "/" .. repoName .. "/releases/download/" .. pluginObject.r .. "/" .. vFoundBuildName .. "-" .. pluginPlatform .. ".tgz"
@@ -562,12 +564,12 @@ local function CollectCoronaPlugins(params)
562564
end
563565
local lua51Dir = pathJoin(params.extractLocation, "lua_51")
564566
if ret and isDir(lua51Dir) then
565-
if isWindows then
566-
exec("move " .. quoteString(lua51Dir) .. SEP .. "* " .. quoteString(params.extractLocation))
567-
else
568-
exec("mv " .. quoteString(lua51Dir) .. SEP .. "* " .. quoteString(params.extractLocation))
567+
for file in lfs.dir(lua51Dir) do
568+
if file ~= "." and file ~= ".." then
569+
os.rename(pathJoin(lua51Dir, file), pathJoin(params.extractLocation, file))
570+
end
569571
end
570-
exec("rmdir " .. quoteString(pathJoin(params.extractLocation, "lua_51")))
572+
exec("rmdir " .. quoteString(lua51Dir))
571573
end
572574
else
573575
if isWindows then

0 commit comments

Comments
 (0)