Index: namazu/filter/bzip2.pl =================================================================== RCS file: /storage/cvsroot/namazu/filter/bzip2.pl,v retrieving revision 1.16 diff -u -r1.16 bzip2.pl --- namazu/filter/bzip2.pl 2000/03/23 10:41:04 1.16 +++ namazu/filter/bzip2.pl 2001/10/17 12:43:46 @@ -64,6 +64,7 @@ { my $fh = util::efopen("|$bzip2path -d > $tmpfile"); + if ( ! $fh ) { return undef } print $fh $$cont; } { Index: namazu/filter/gzip.pl =================================================================== RCS file: /storage/cvsroot/namazu/filter/gzip.pl,v retrieving revision 1.16 diff -u -r1.16 gzip.pl --- namazu/filter/gzip.pl 2000/03/23 10:41:04 1.16 +++ namazu/filter/gzip.pl 2001/10/17 12:43:46 @@ -55,8 +55,8 @@ return; } -sub filter ($$$$$) { - my ($orig_cfile, $cont, $weighted_str, $headings, $fields) +sub filter ($$$$$$$) { + my ($orig_cfile, $cont, $weighted_str, $headings, $fields, $mother_cfile, $fragment) = @_; my $err = undef; @@ -73,12 +73,13 @@ my $tmpfile = util::tmpnam('NMZ.gzip'); my $fh = util::efopen("|$gzippath -cd > $tmpfile"); - + if ( ! $fh ) { return $! } util::vprint("Processing gzip file ... (using '$gzippath')\n"); print $fh $$contref; undef $fh; $fh = util::efopen("$tmpfile"); + if ( ! $fh ) { return $! } my $size = util::filesize($fh); if ($size > $conf::FILE_SIZE_MAX) { return 'too_large_gzipped_file'; Index: namazu/pl/util.pl =================================================================== RCS file: /storage/cvsroot/namazu/pl/util.pl,v retrieving revision 1.22.4.5 diff -u -r1.22.4.5 util.pl --- namazu/pl/util.pl 2001/09/16 22:42:27 1.22.4.5 +++ namazu/pl/util.pl 2001/10/17 12:43:47 @@ -45,9 +45,7 @@ sub efopen ($) { my ($fname) = @_; - - my $fh = fopen($fname) || cdie("$fname: $!\n"); - + my $fh = fopen($fname) || return undef; return $fh; } Index: namazu/scripts/mknmz.in =================================================================== RCS file: /storage/cvsroot/namazu/scripts/mknmz.in,v retrieving revision 1.85.4.17 diff -u -r1.85.4.17 mknmz.in --- namazu/scripts/mknmz.in 2001/09/21 08:11:07 1.85.4.17 +++ namazu/scripts/mknmz.in 2001/10/17 12:43:52 @@ -474,6 +474,8 @@ my ($cfile_size, $text_size, $kanji, $mtype) = load_document(\$cfile, \$content, \$weighted_str, \$headings, \%fields); + if ($cfile_size < 0 ) { + print $msg_prefix . "$uri $!\n"; } util::dprint(_("after load_document: ")."$uri: $cfile_size, $text_size, $kanji, $mtype\n"); @@ -814,7 +816,8 @@ eval '$err = ' . $var::REQUIRE_ACTIONS{$mtype} . '::filter($orig_cfile, $contref, $weighted_str, $headings, $fields);'; if ($err) { - return ($file_size, $file_size, 0, "$mtype; x-error=$err"); + return (-1, $file_size, 0, "$mtype; x-error=$err"); +# return ($file_size, $file_size, 0, "$mtype; x-error=$err"); } if ($@) {