namazu-ml(avocado)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIME の message/partial (Re: mknmz の Out of memory..)



Satoru Takabayashi <ccsatoru@xxxxxxxxxxxxxxxxxx> wrote:

>>おそらく,@FList を先頭からなめてって,ディレクトリなら chdir して
>>find::findfiles するのが一番修正が少なくてよろしいかと思います.
>
>それが良さそうです。そのうち対応します。

パッチです。たぶん動きます。

-- Satoru Takabayashi

*** mknmz.pl~	Tue Oct 13 05:16:16 1998
--- mknmz.pl	Wed Oct 14 16:49:31 1998
***************
*** 1383,1388 ****
--- 1383,1408 ----
      grep(s/^\.\Q$PSC\E/$cwd$PSC/, @FList); 
      grep(s/^([^\Q$PSC\E])/$cwd$PSC$1/, @FList); 
      grep(chop, @FList); 
+ 
+     # traverse directories
+     # this routine is not efficent but I perfer reliable logic.
+     my @tmp = @FList;
+     my @tmp2 = ();
+     @FList = ();
+     while (@tmp) {
+ 	$_ = shift (@tmp);
+ 	if (s!\Q$PSC\E$!!) { # path ending with $PSC
+ 	    my $cwd = cwd();
+ 	    chdir $_;
+ 	    find::findfiles($PSC);
+ 	    push(@tmp2, @FList);
+ 	    @FList = ();
+ 	    chdir $cwd;
+ 	} else {
+ 	    push(@tmp2, $_);
+ 	}
+     }
+     @FList = @tmp2;
  }
  
  sub usage () {
***************
*** 1833,1838 ****
--- 1853,1859 ----
      $all_file_size = commas($all_file_size);
      $key_count = commas($key_count - $LastKeyN);
      $processtime = time - $start_time;
+     my $deleted_file_count = commas($DeletedFilesNumber);
  
      $logmsg = "[Base]";
      $logmsg = "[Append]" if $APPENDMODE;
***************
*** 1841,1846 ****
--- 1862,1868 ----
  	"\n$logmsg\n" .
  	"Date: $date\n" .
  	"Files: $file_count files\n" .
+ 	"DeletedFiles: $deleted_file_count files\n" .
          "Size: $all_file_size bytes\n" .
          "Keywords: $key_count words\n" .
          "Wakati: $WAKATI\n" .