Skip to content

Commit

Permalink
Content store: Ignore '_game' in game names in ID generation (#8270)
Browse files Browse the repository at this point in the history
Fixes 'install' button continuing to be displayed after installing a game whose
name ends with '_game'.
  • Loading branch information
rubenwardy authored and paramat committed Feb 22, 2019
1 parent 0ad96cc commit 85389ad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion builtin/mainmenu/dlg_contentstore.lua
Expand Up @@ -297,7 +297,12 @@ function store.load()
package.author .. "/" .. package.name ..
"/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

store.packages = store.packages_full
Expand Down

0 comments on commit 85389ad

Please sign in to comment.