Skip to content

Commit

Permalink
Offer ContentDB updates for leftover bundled Minetest Game
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp committed Oct 21, 2023
1 parent 8a98552 commit 502b81b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions builtin/mainmenu/dlg_contentstore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,16 @@ function store.update_paths()
if game.author ~= "" and game.release > 0 then
local id = game.author:lower() .. "/" .. game.id
game_hash[store.aliases[id] or id] = game

-- Until Minetest 5.8.0, Minetest Game was bundled with Minetest.
-- Unfortunately, the bundled MTG was not versioned (missing "release"
-- field in game.conf).
-- Therefore, we consider any installation of MTG that is not versioned,
-- has not been cloned from Git, and is not system-wide to be updatable.
elseif game.id == "minetest" and game.release == 0 and
not core.is_dir(game.path .. "/.git") and core.may_modify_path(game.path) then
local id = "minetest/minetest"
game_hash[store.aliases[id] or id] = game
end
end

Expand All @@ -816,6 +826,7 @@ function store.update_paths()
package.installed_release = content.release or 0
else
package.path = nil
package.installed_release = nil
end
end
end
Expand Down

0 comments on commit 502b81b

Please sign in to comment.