fix errors when executing Lua mods being weird (not completely tested)
This commit is contained in:
@@ -39,13 +39,18 @@ local function endsWith(str, suffix)
|
|||||||
return str:sub(-string.len(suffix)) == suffix
|
return str:sub(-string.len(suffix)) == suffix
|
||||||
end
|
end
|
||||||
|
|
||||||
local function runFolder(folder)
|
local function executeProtected(s)
|
||||||
for k, str in pairs(File.DirSearch(folder)) do
|
print(s)
|
||||||
local s = str:gsub("\\", "/")
|
dofile(s)
|
||||||
|
end
|
||||||
|
|
||||||
if endsWith(str, ".lua") then
|
local function runFolder(folder)
|
||||||
print(s)
|
local search = File.DirSearch(folder)
|
||||||
dofile(s)
|
for i = 1, #search, 1 do
|
||||||
|
local s = search[i]:gsub("\\", "/")
|
||||||
|
|
||||||
|
if endsWith(s, ".lua") then
|
||||||
|
executeProtected(s)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user