Check that mod is a folder and not empty
This commit is contained in:
parent
f8e19bfed2
commit
94beeb14c9
@ -85,6 +85,7 @@ LUI.MenuBuilder.m_types_build["mods_menu"] = function(a1)
|
||||
if (io.directoryexists("mods")) then
|
||||
local mods = io.listfiles("mods/")
|
||||
for i = 1, #mods do
|
||||
if (io.directoryexists(mods[i]) and not io.directoryisempty(mods[i])) then
|
||||
local name, desc = getmodname(mods[i])
|
||||
|
||||
if (mods[i] ~= modfolder) then
|
||||
@ -96,6 +97,7 @@ LUI.MenuBuilder.m_types_build["mods_menu"] = function(a1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
menu:AddBackButton(function(a1)
|
||||
Engine.PlaySound(CoD.SFX.MenuBack)
|
||||
|
Loading…
x
Reference in New Issue
Block a user