diff options
author | rubenwardy <rw@rubenwardy.com> | 2019-02-18 16:36:13 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2019-02-18 16:39:28 +0000 |
commit | 57517628f03632587f68b5e8a1e6c641be07e629 (patch) | |
tree | 14b9f399507c91db0d325816e245a668ef5946d8 | |
parent | cc9bed9321606342b27747ce7474ed8393517b78 (diff) | |
download | minetest-57517628f03632587f68b5e8a1e6c641be07e629.tar.gz minetest-57517628f03632587f68b5e8a1e6c641be07e629.tar.bz2 minetest-57517628f03632587f68b5e8a1e6c641be07e629.zip |
Fix games not updating on deletion
As reported by @random-geek
-rw-r--r-- | builtin/mainmenu/dlg_delete_content.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/builtin/mainmenu/dlg_delete_content.lua b/builtin/mainmenu/dlg_delete_content.lua index 8bc80b103..9d89316a0 100644 --- a/builtin/mainmenu/dlg_delete_content.lua +++ b/builtin/mainmenu/dlg_delete_content.lua @@ -40,7 +40,12 @@ local function delete_content_buttonhandler(this, fields) if not core.delete_dir(this.data.content.path) then gamedata.errormessage = fgettext("pkgmgr: failed to delete \"$1\"", this.data.content.path) end - pkgmgr.refresh_globals() + + if this.data.content.type == "game" then + pkgmgr.update_gamelist() + else + pkgmgr.refresh_globals() + end else gamedata.errormessage = fgettext("pkgmgr: invalid path \"$1\"", this.data.content.path) end |