From 36baad6370f19264379d7b040a8f7b13a6d03d4c Mon Sep 17 00:00:00 2001 From: teepe Date: Wed, 12 Dec 2001 23:23:29 +0000 Subject: [PATCH] it didn't really parse all directories, eerhhmmm git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1856 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- config/ri_once.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/config/ri_once.pl b/config/ri_once.pl index 3c77f2ae..8a4a84f1 100755 --- a/config/ri_once.pl +++ b/config/ri_once.pl @@ -215,15 +215,28 @@ sub dofile { # process a directory recursively sub dodir { + my $dirname; + my $file; + my $full; + my @files; + my $i; $dirname = $_[0]; $dirname =~ s/\/$//; opendir(DIR, $dirname) or die "can't opendir $dirname: $!"; + $i = 0; while (defined($file = readdir(DIR))) { + @files[$i++] = $file; + } + $i = 0; + while (defined($file = @files[$i++])) { next if $file =~ /^\.\.?$/; $full = $dirname.'/'.$file; +# print "found: $full\n"; if (-d $full) { +# print "doing dir: $full\n"; &dodir($full); } else { if ($file =~ /.*\.php$/) { +# print "doing file: $full\n"; &dofile($full); }} } -- 2.25.1