diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2025-06-08 10:34:57 +0100 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2025-06-08 10:34:57 +0100 |
commit | e4915551e4e85130c6d5aabc7bf5e64a954d16db (patch) | |
tree | 934a210de20a9f1281b7c30e159561aecb8c9482 /perl-install | |
parent | 016e90c5f8786a6c4009f9ef6eb5d7e9f110cb72 (diff) | |
download | drakx-e4915551e4e85130c6d5aabc7bf5e64a954d16db.tar drakx-e4915551e4e85130c6d5aabc7bf5e64a954d16db.tar.gz drakx-e4915551e4e85130c6d5aabc7bf5e64a954d16db.tar.bz2 drakx-e4915551e4e85130c6d5aabc7bf5e64a954d16db.tar.xz drakx-e4915551e4e85130c6d5aabc7bf5e64a954d16db.zip |
Fix new implementation of any::sessions() (mga#33738)
Commit 98978485f changed sessions() to search two directories, but
didn't merge the results into a single list. Actually the code was
not valid Perl, so sessions() always returned an empty list.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index bbc051bcc..eb0782573 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -1150,13 +1150,14 @@ sub ask_user_and_root { } sub sessions() { + my @l; my @dir_wm = qw(xsessions wayland-sessions); foreach my $dwm (@dir_wm) { my $old = chdir("$::prefix/usr/share/$dwm/"); - my @l = map { s/.desktop$//; $_ } glob("*.desktop"); + push @l, map { s/.desktop$//; $_ } glob("*.desktop"); chdir($old); - @l; } + @l; } sub sessions_with_order() { my %h = map { /(.*)=(.*)/ } split(' ', run_program::rooted_get_stdout($::prefix, '/usr/sbin/chksession', '-L')); |