summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcontrol-center15
1 files changed, 6 insertions, 9 deletions
diff --git a/control-center b/control-center
index 0f0d78d5..6c91d78b 100755
--- a/control-center
+++ b/control-center
@@ -1222,17 +1222,14 @@ my $align2 = lang::text_direction_rtl() ? "right" : "left";
foreach (@tree) {
my ($text, $icon, $subtree) = @$_;
- my @subtree;
- foreach my $stuff (@$subtree) {
+ my @subtree = grep {
+ my $stuff = $_;
my $exec = first(split /\s+/, $programs{$stuff}{binary});
- next if $programs{$stuff}{hidden};
+ my $is_present = -x $exec;
# do not complain about missing entries in move:
- if (-x $exec) {
- push @subtree, $stuff;
- } elsif (-e $exec) {
- warn qq("$exec" is not executable [$stuff]) if $mdk_rel !~ /Move/;
- }
- }
+ warn qq("$exec" is not executable [$stuff]) if $mdk_rel !~ /Move/ && !$is_present;
+ !$programs{$stuff}{hidden} && $is_present;
+ } @$subtree;
# Skip empty classes:
next if !@subtree;