summaryrefslogtreecommitdiff
path: root/builtin/mainmenu
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2019-02-18 16:36:13 +0000
committerrubenwardy <rw@rubenwardy.com>2019-02-18 16:39:28 +0000
commit57517628f03632587f68b5e8a1e6c641be07e629 (patch)
tree14b9f399507c91db0d325816e245a668ef5946d8 /builtin/mainmenu
parentcc9bed9321606342b27747ce7474ed8393517b78 (diff)
downloadminetest-57517628f03632587f68b5e8a1e6c641be07e629.tar.gz
minetest-57517628f03632587f68b5e8a1e6c641be07e629.tar.bz2
minetest-57517628f03632587f68b5e8a1e6c641be07e629.zip
Fix games not updating on deletion
As reported by @random-geek
Diffstat (limited to 'builtin/mainmenu')
-rw-r--r--builtin/mainmenu/dlg_delete_content.lua7
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