aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-08-13 01:16:15 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-08-13 02:02:37 +0200
commit84f0017d93a1f62261d3d640a0111f71e993e54d (patch)
tree0960a245147d1bc22dec437d03b8baa3de1ba652
parenta8aec7a0e6f505ed750ce61991012d6d47cc7bda (diff)
downloadcommon-data-84f0017d93a1f62261d3d640a0111f71e993e54d.tar
common-data-84f0017d93a1f62261d3d640a0111f71e993e54d.tar.gz
common-data-84f0017d93a1f62261d3d640a0111f71e993e54d.tar.bz2
common-data-84f0017d93a1f62261d3d640a0111f71e993e54d.tar.xz
common-data-84f0017d93a1f62261d3d640a0111f71e993e54d.zip
do not reinvent glob()
-rwxr-xr-xsbin/chksession4
1 files changed, 1 insertions, 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($_);
}