it didn't really parse all directories, eerhhmmm
authorteepe <teepe@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 12 Dec 2001 23:23:29 +0000 (23:23 +0000)
committerteepe <teepe@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 12 Dec 2001 23:23:29 +0000 (23:23 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1856 7612ce4b-ef26-0410-bec9-ea0150e637f0

config/ri_once.pl

index 3c77f2a..8a4a84f 100755 (executable)
@@ -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);
        }}
     }