aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/chksession
diff options
context:
space:
mode:
authorChmouel Boudjnah <chmouel@mandriva.org>2000-08-31 01:51:39 +0000
committerChmouel Boudjnah <chmouel@mandriva.org>2000-08-31 01:51:39 +0000
commite15d7b40e8e5b470c9dacf79c113edd369352b62 (patch)
treed2a8c9bf5d6bb0457797cd98018c26357a8cdb21 /sbin/chksession
parent20524745f60e025c1da3a6ab29b4b5f0f59fc6dd (diff)
downloadcommon-data-e15d7b40e8e5b470c9dacf79c113edd369352b62.tar
common-data-e15d7b40e8e5b470c9dacf79c113edd369352b62.tar.gz
common-data-e15d7b40e8e5b470c9dacf79c113edd369352b62.tar.bz2
common-data-e15d7b40e8e5b470c9dacf79c113edd369352b62.tar.xz
common-data-e15d7b40e8e5b470c9dacf79c113edd369352b62.zip
Avoid opendir use csh internal globing...
Diffstat (limited to 'sbin/chksession')
-rw-r--r--sbin/chksession6
1 files changed, 1 insertions, 5 deletions
diff --git a/sbin/chksession b/sbin/chksession
index 2afe61c..72208a8 100644
--- a/sbin/chksession
+++ b/sbin/chksession
@@ -68,11 +68,7 @@ while ($ARGV[0] =~ /^--/ || $ARGV[0] =~ /^-/) {
}
$dir = $test ? './wmsession.d/' : '/etc/X11/wmsession.d/' unless $dir;
-opendir D, $dir or die "Can't open $dir\n";
-for (readdir(D)) {
- my $file = $_;
- parse_file ("$dir/$file");
-}
+chdir $dir; parse_file ("$dir/$_") for <*>;
sub cat { my ($f) = @_; local *F; open F, $f; join '', <F> }
my ($e) = cat("/etc/sysconfig/desktop") =~ /(\S+)/;