Changeset 7693 for trunk/gsdl
- Timestamp:
- 2004-07-02T10:08:04+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/ISISPlug.pm
r7686 r7693 305 305 if ($field eq $document_field) { 306 306 my $document_file_full = $document_prefix . $value . $document_suffix; 307 my ($document_file) = ($document_file_full =~ /([^\/]+)$/); 308 if (&obtain_document($self, $document_file_full, $document_file,309 $documents_directory)) {307 308 my $document_file = &obtain_document($self, $document_file_full, $documents_directory); 309 if ($document_file) { 310 310 $document_obtained = 1; 311 311 &write_metadata_xml_file($self->{'documents_metadata_xml_file'}, … … 367 367 my $self = shift(@_); 368 368 my $document_file_full = shift(@_); 369 my $document_file_name = shift(@_);370 369 my $documents_directory = shift(@_); 371 my $local_document_file = &util::filename_cat($documents_directory, $document_file_name);372 370 373 371 my $outhandle = $self->{'outhandle'}; … … 375 373 if ($self->{'verbosity'} > 1); 376 374 375 my $document_file_name; 376 my $local_document_file; 377 377 378 # Document specified is on the web 378 379 if ($document_file_full =~ /^http:/ || $document_file_full =~ /^ftp:/) { 380 $document_file_full =~ /([^\/]+)$/; 381 $document_file_name = $1; 382 $local_document_file = &util::filename_cat($documents_directory, $document_file_name); 383 379 384 my $wget_options = "--quiet"; 380 385 $wget_options = "--verbose" if ($self->{'verbosity'} > 2); … … 384 389 # Document specified is on the disk 385 390 else { 391 my $dir_sep = &util::get_os_dirsep(); 392 $document_file_full =~ /(.+$dir_sep)?(.*)$/; 393 $document_file_name = $2; 394 $local_document_file = &util::filename_cat($documents_directory, $document_file_name); 395 386 396 &util::cp($document_file_full, $documents_directory); 387 397 } … … 390 400 if (!-e $local_document_file) { 391 401 print STDERR "WARNING: Could not obtain document file $document_file_full\n"; 392 return 0;393 } 394 395 return 1;402 return undef; 403 } 404 405 return $document_file_name; 396 406 } 397 407
Note:
See TracChangeset
for help on using the changeset viewer.