From e15d7b40e8e5b470c9dacf79c113edd369352b62 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Thu, 31 Aug 2000 01:51:39 +0000 Subject: Avoid opendir use csh internal globing... --- sbin/chksession | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'sbin') 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 '', } my ($e) = cat("/etc/sysconfig/desktop") =~ /(\S+)/; -- cgit v1.2.1