Changeset 10156 for trunk/gsdl/perllib/plugins/RecPlug.pm
- Timestamp:
- 2005-06-23T11:19:53+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/RecPlug.pm
r9853 r10156 166 166 } 167 167 168 sub begin { 169 my $self = shift (@_); 170 my ($pluginfo, $base_dir, $processor, $maxdocs) = @_; 171 172 my $proc_package_name = ref $processor; 173 174 if ($proc_package_name !~ /buildproc$/) { 175 176 # Only lookup timestamp info for import.pl 177 178 my $output_dir = $processor->getoutputdir(); 179 my $archives_inf = &util::filename_cat($output_dir,"archives.inf"); 180 181 if ( -e $archives_inf ) { 182 $self->{'inf_timestamp'} = -M $archives_inf; 183 } 184 } 185 186 $self->SUPER::begin($pluginfo, $base_dir, $processor, $maxdocs); 187 } 188 189 168 190 # return 1 if this class might recurse using $pluginfo 169 191 sub is_recursive { … … 413 435 } 414 436 } 415 437 438 439 my $file_subfile = &util::filename_cat($file, $subfile); 440 my $filename_subfile 441 = &util::filename_cat($this_file_base_dir,$file_subfile); 442 if (defined $self->{'inf_timestamp'}) { 443 my $inf_timestamp = $self->{'inf_timestamp'}; 444 445 if (! -d $filename_subfile) { 446 my $filename_timestamp = -M $filename_subfile; 447 if ($filename_timestamp > $inf_timestamp) { 448 # filename has been around for longer than inf 449 ##### print $outhandle "**** Skipping $subfile\n"; 450 next; 451 } 452 } 453 } 454 416 455 # Recursively read each $subfile 417 456 print $outhandle "RecPlug recurring: $subfile\n" if ($verbosity > 2); 418 457 419 458 $count += &plugin::read ($pluginfo, $this_file_base_dir, 420 &util::filename_cat($file, $subfile),459 $file_subfile, 421 460 $out_metadata, $processor, $maxdocs, ($total_count + $count), $gli); 422 461 }
Note:
See TracChangeset
for help on using the changeset viewer.