Ignore .name directories and files

Signed-off-by: Craig Robbins <kde.psych@gmail.com>
This commit is contained in:
SmallJoker 2014-12-07 11:14:52 +01:00 committed by Nils Dagsson Moskopp
parent 9806ede6a3
commit e98bb3edcc
Signed by: erle
GPG Key ID: A3BC671C35191080
2 changed files with 30 additions and 26 deletions

View File

@ -17,9 +17,10 @@
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
function get_mods(path,retval,modpack) function get_mods(path,retval,modpack)
local mods = core.get_dirlist(path, true) local mods = core.get_dirlist(path, true)
for i=1, #mods, 1 do for i=1, #mods, 1 do
if mods[i]:sub(1,1) ~= "." then
local toadd = {} local toadd = {}
local modpackfile = nil local modpackfile = nil
@ -44,6 +45,7 @@ function get_mods(path,retval,modpack)
end end
end end
end end
end
--modmanager implementation --modmanager implementation
modmgr = {} modmgr = {}

View File

@ -31,12 +31,14 @@ local function render_texture_pack_list(list)
local retval = "" local retval = ""
for i, v in ipairs(list) do for i, v in ipairs(list) do
if v:sub(1,1) ~= "." then
if retval ~= "" then if retval ~= "" then
retval = retval .."," retval = retval ..","
end end
retval = retval .. core.formspec_escape(v) retval = retval .. core.formspec_escape(v)
end end
end
return retval return retval
end end