Skip to content

Commit

Permalink
Fix incorrect view URL for games
Browse files Browse the repository at this point in the history
package.id is a sanitised combination of author and basename, used to
compare remote and local content. Minetest ignores `_game` when comparing
game names, so package.id has `_game` removed. This meant that the wrong
URL was being generated for View.
  • Loading branch information
rubenwardy committed Jul 28, 2020
1 parent ae83edd commit f948e2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions builtin/mainmenu/dlg_contentstore.lua
Expand Up @@ -505,8 +505,9 @@ function store.handle_submit(this, fields)
end

if fields["view_" .. i] then
local url = ("%s/packages/%s?protocol_version=%d"):format(
core.settings:get("contentdb_url"), package.id, core.get_max_supp_proto())
local url = ("%s/packages/%s/%s?protocol_version=%d"):format(
core.settings:get("contentdb_url"),
package.author, package.name, core.get_max_supp_proto())
core.open_url(url)
return true
end
Expand Down

0 comments on commit f948e2c

Please sign in to comment.