Add core.get_dir_list

This commit is contained in:
ShadowNinja 2015-05-04 14:59:13 -04:00 committed by Nils Dagsson Moskopp
parent de7cd53f41
commit 6afcc26bac
Signed by: erle
GPG Key ID: A3BC671C35191080
2 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@
--------------------------------------------------------------------------------
function get_mods(path,retval,modpack)
local mods = core.get_dirlist(path, true)
local mods = core.get_dir_list(path, true)
for i=1, #mods, 1 do
if mods[i]:sub(1,1) ~= "." then
@ -94,7 +94,7 @@ function modmgr.getbasefolder(temppath)
}
end
local subdirs = core.get_dirlist(temppath,true)
local subdirs = core.get_dir_list(temppath, true)
--only single mod or modpack allowed
if #subdirs ~= 1 then

View File

@ -50,7 +50,7 @@ local function get_formspec(tabview, name, tabdata)
"textlist[4,0.25;7.5,5.0;TPs;"
local current_texture_path = core.setting_get("texture_path")
local list = filter_texture_pack_list(core.get_dirlist(core.get_texturepath(), true))
local list = filter_texture_pack_list(core.get_dir_list(core.get_texturepath(), true))
local index = tonumber(core.setting_get("mainmenu_last_selected_TP"))
if index == nil then index = 1 end
@ -94,7 +94,7 @@ local function main_button_handler(tabview, fields, name, tabdata)
local index = core.get_textlist_index("TPs")
core.setting_set("mainmenu_last_selected_TP",
index)
local list = filter_texture_pack_list(core.get_dirlist(core.get_texturepath(), true))
local list = filter_texture_pack_list(core.get_dir_list(core.get_texturepath(), true))
local current_index = core.get_textlist_index("TPs")
if current_index ~= nil and #list >= current_index then
local new_path = core.get_texturepath()..DIR_DELIM..list[current_index]