1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix rename modpack dialog not appearing to take affect

This commit is contained in:
rubenwardy 2019-02-03 01:49:53 +00:00
parent 7c239767ff
commit 809cb9fc0b
2 changed files with 19 additions and 5 deletions

View file

@ -22,7 +22,10 @@ function get_mods(path,retval,modpack)
for _, name in ipairs(mods) do
if name:sub(1, 1) ~= "." then
local prefix = path .. DIR_DELIM .. name
local toadd = {}
local toadd = {
dir_name = name,
parent_dir = path,
}
retval[#retval + 1] = toadd
-- Get config file
@ -35,11 +38,13 @@ function get_mods(path,retval,modpack)
mod_conf = Settings(prefix .. DIR_DELIM .. "modpack.conf"):to_table()
if mod_conf.name then
name = mod_conf.name
toadd.is_name_explicit = true
end
else
mod_conf = Settings(prefix .. DIR_DELIM .. "mod.conf"):to_table()
if mod_conf.name then
name = mod_conf.name
toadd.is_name_explicit = true
end
end