Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
修复获取模组ID会出现两个 - 的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yechentide committed Jul 5, 2022
1 parent 352af78 commit f4e5533
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -364,19 +364,19 @@ function generate_installed_mods_table(repo_root, v1dir, v2dir)
-- ["3333"] = "名前3",
-- ...
-- }

for index, path in ipairs(all_modinfo) do
local name = get_info_from_modinfo(path, "name")
local id = exec_linux_command_get_output("echo "..path.." | awk -F/ '{print $(NF-1)}'")
if string.find(id, "workshop") then
id = string.sub(id, 9)
id = string.sub(id, 10)
end
table.insert(dic["id_array"], id)
table.insert(dic["name_array"], name)
dic["path_array"][id] = path
dic[id] = name
dic[name] = id
end

return dic
end

0 comments on commit f4e5533

Please sign in to comment.