mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 22:52:25 +01:00
Content store: Ignore '_game' in game names in ID generation (#8270)
Fixes 'install' button continuing to be displayed after installing a game whose name ends with '_game'.
This commit is contained in:
parent
0ad96cc73f
commit
85389ad994
@ -297,7 +297,12 @@ function store.load()
|
|||||||
package.author .. "/" .. package.name ..
|
package.author .. "/" .. package.name ..
|
||||||
"/releases/" .. package.release .. "/download/"
|
"/releases/" .. package.release .. "/download/"
|
||||||
|
|
||||||
package.id = package.author .. "/" .. package.name
|
local name_len = #package.name
|
||||||
|
if package.type == "game" and name_len > 5 and package.name:sub(name_len - 4) == "_game" then
|
||||||
|
package.id = package.author .. "/" .. package.name:sub(1, name_len - 5)
|
||||||
|
else
|
||||||
|
package.id = package.author .. "/" .. package.name
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
store.packages = store.packages_full
|
store.packages = store.packages_full
|
||||||
|
Loading…
Reference in New Issue
Block a user