From d0fb6ac3c0d934251c7a49db819b3333aa91abcf Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Sun, 18 Sep 2022 02:41:11 +0100 Subject: [PATCH] fix: Ignore empty results on root installed apps listing --- lib/services/root_api.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/services/root_api.dart b/lib/services/root_api.dart index 9f96efe0de..68a8cc401c 100644 --- a/lib/services/root_api.dart +++ b/lib/services/root_api.dart @@ -58,7 +58,9 @@ class RootAPI { cmd: 'ls "$_managerDirPath"', ); if (res != null) { - return res.split('\n').map((pack) => pack.trim()).toList(); + List apps = res.split('\n'); + apps.removeWhere((pack) => pack.isEmpty); + return apps.map((pack) => pack.trim()).toList(); } } on Exception { return List.empty();