[gnome-software/wip/hughsie/fwupd-cache: 15/15] fwupd: Delete the file from the cache when installed



commit 0f0613838ec38a9c0f9c537b5eb0cda6d8863eb5
Author: Richard Hughes <richard hughsie com>
Date:   Fri Mar 8 15:14:20 2019 +0000

    fwupd: Delete the file from the cache when installed
    
    It's super-unlikely the user will ever use this archive again.

 plugins/fwupd/gs-plugin-fwupd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
index 77a80ed1..b8750d03 100644
--- a/plugins/fwupd/gs-plugin-fwupd.c
+++ b/plugins/fwupd/gs-plugin-fwupd.c
@@ -801,8 +801,10 @@ gs_plugin_fwupd_install (GsPlugin *plugin,
                gs_app_set_state_recover (app);
                return FALSE;
        }
+
+       /* delete the file from the cache */
        gs_app_set_state (app, AS_APP_STATE_INSTALLED);
-       return TRUE;
+       return g_file_delete (local_file, cancellable, error);
 }
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]