Fix games not updating on deletion
authorrubenwardy <rw@rubenwardy.com>
Mon, 18 Feb 2019 16:36:13 +0000 (16:36 +0000)
committerrubenwardy <rw@rubenwardy.com>
Mon, 18 Feb 2019 16:39:28 +0000 (16:39 +0000)
As reported by @random-geek

builtin/mainmenu/dlg_delete_content.lua

index 8bc80b103c96a487707bc9a3ac72595504ff6730..9d89316a06c3de92c6c8b03ed3e1c078fe1431a5 100644 (file)
@@ -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