Skip to content

Commit 85389ad

Browse files
rubenwardyparamat
authored andcommittedFeb 22, 2019
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'.
1 parent 0ad96cc commit 85389ad

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎builtin/mainmenu/dlg_contentstore.lua

+6-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,12 @@ function store.load()
297297
package.author .. "/" .. package.name ..
298298
"/releases/" .. package.release .. "/download/"
299299

300-
package.id = package.author .. "/" .. package.name
300+
local name_len = #package.name
301+
if package.type == "game" and name_len > 5 and package.name:sub(name_len - 4) == "_game" then
302+
package.id = package.author .. "/" .. package.name:sub(1, name_len - 5)
303+
else
304+
package.id = package.author .. "/" .. package.name
305+
end
301306
end
302307

303308
store.packages = store.packages_full

0 commit comments

Comments
 (0)
Please sign in to comment.