diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-07-28 17:01:52 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-07-28 17:02:32 +0100 |
commit | f948e2c58570df6bc77226b6066fec5ed90051ee (patch) | |
tree | 419e3928682041b7a840db46338226c8b99f357b /builtin | |
parent | ae83edd16581b2b5426b565e703a8766e88dbbf6 (diff) | |
download | minetest-f948e2c58570df6bc77226b6066fec5ed90051ee.tar.gz minetest-f948e2c58570df6bc77226b6066fec5ed90051ee.tar.bz2 minetest-f948e2c58570df6bc77226b6066fec5ed90051ee.zip |
Fix incorrect view URL for games
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.
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/mainmenu/dlg_contentstore.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/mainmenu/dlg_contentstore.lua b/builtin/mainmenu/dlg_contentstore.lua index 01c42be0b..37ceeb6c8 100644 --- a/builtin/mainmenu/dlg_contentstore.lua +++ b/builtin/mainmenu/dlg_contentstore.lua @@ -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 |