From 84f0017d93a1f62261d3d640a0111f71e993e54d Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 13 Aug 2016 01:16:15 +0200 Subject: do not reinvent glob() --- sbin/chksession | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sbin/chksession b/sbin/chksession index 108bc9b..f7b7c7c 100755 --- a/sbin/chksession +++ b/sbin/chksession @@ -71,9 +71,7 @@ while ($ARGV[0] =~ /^--/ || $ARGV[0] =~ /^-/) { # Parse all relevant files in session directory $dir $dir = $test ? './xsessions/' : '/usr/share/xsessions/' unless $dir; chdir $dir; -for (<*>) { - next if /.*~/; - next if /.*\.rpm(save|old)/; +foreach (glob("*.desktop")) { parse_file($_); } -- cgit v1.2.1