Changeset 7932
- Timestamp:
- 2004-08-12T11:46:31+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/RecPlug.pm
r7688 r7932 192 192 my $verbosity = $self->{'verbosity'}; 193 193 my $read_metadata_files = $self->{'use_metadata_files'}; 194 194 195 195 # Calculate the directory name and ensure it is a directory and 196 196 # that it is not explicitly blocked. … … 199 199 return undef unless (-d $dirname); 200 200 return 0 if ($self->{'block_exp'} ne "" && $dirname =~ /$self->{'block_exp'}/); 201 201 202 202 # check to make sure we're not reading the archives or index directory 203 203 my $gsdlhome = quotemeta($ENV{'GSDLHOME'}); … … 299 299 300 300 my $subfile = $dir[$i]; 301 my $this_file_base_dir = $base_dir; 301 302 last if ($maxdocs != -1 && $count >= $maxdocs); 302 303 next if ($subfile =~ /^\.\.?$/); 303 304 next if ($read_metadata_files && $subfile =~ /metadata\.xml$/); 305 306 # Follow Windows shortcuts 307 if ($subfile =~ /(?i)\.lnk$/ && $ENV{'GSDLOS'} =~ /^windows$/i) { 308 require Win32::Shortcut; 309 my $shortcut = new Win32::Shortcut(&util::filename_cat($dirname, $subfile)); 310 if ($shortcut) { 311 # The file to be processed is now the target of the shortcut 312 $this_file_base_dir = ""; 313 $file = ""; 314 $subfile = $shortcut->Path; 315 } 316 } 304 317 305 318 # check for a symlink pointing back to a leading directory … … 345 358 print $outhandle "RecPlug recurring: $subfile\n" if ($verbosity > 2); 346 359 347 $count += &plugin::read ($pluginfo, $ base_dir,360 $count += &plugin::read ($pluginfo, $this_file_base_dir, 348 361 &util::filename_cat($file, $subfile), 349 362 $out_metadata, $processor, $maxdocs, $gli);
Note:
See TracChangeset
for help on using the changeset viewer.