[gnome-software] trivial: Include related apps when getting the installed size



commit 8d70dce3eb8465215afb381fc429048471a45304
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jan 12 19:42:11 2017 +0000

    trivial: Include related apps when getting the installed size

 src/gs-app.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index abc74c7..9d37229 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -2664,6 +2664,12 @@ gs_app_get_size_installed (GsApp *app)
                        sz += gs_app_get_size_installed (app->runtime);
        }
 
+       /* add related apps */
+       for (guint i = 0; i < app->related->len; i++) {
+               GsApp *app_related = g_ptr_array_index (app->related, i);
+               sz += gs_app_get_size_installed (app_related);
+       }
+
        return sz;
 }
 


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