- Timestamp:
- 2018-06-22T22:04:16+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/ConvertBinaryFile.pm
r32205 r32206 349 349 $output_filename = $tmp_dirname . "\/$utf8_tailname\/" . $utf8_tailname . ".$output_type"; 350 350 } 351 } elsif ($output_type eq "paged_html") {352 $output_filename =~ s/$lc_suffix$/.html/;353 351 } else { 354 352 $output_filename =~ s/$lc_suffix$/.$output_type/; … … 374 372 if ("$conv_filename" eq "") {return -1;} # had an error, will be passed down pipeline 375 373 376 # We used to return -1 here if $conv_filename didn't exist at this stage377 # However, for "paged_html" convert_to mode, the converted HTML file $conv_filename378 # will only be created from conversion products *after* convert_post_process() returns379 374 my $output_type=$self->{'convert_to'}; 380 if ( $output_type ne "paged_html" && ! -e "$conv_filename") {return -1;}375 if (!&FileUtils::fileExists($conv_filename)) {return -1;} 381 376 $self->{'conv_filename'} = $conv_filename; 382 377 $self->convert_post_process($conv_filename); 383 if ($output_type eq "paged_html" && ! -e "$conv_filename") {return -1;} 378 379 # Check if, after post-processing, the final expected output file has changed 380 # And if it has, check that the final output file now exists after post processing 381 if(defined $self->{'conv_filename_after_post_process'}) { 382 $conv_filename = $self->{'conv_filename_after_post_process'}; 383 if (!&FileUtils::fileExists($conv_filename)) {return -1;} 384 } 384 385 385 386 # Run the "fribidi" (http://fribidi.org) Unicode Bidirectional Algorithm program over the converted file
Note:
See TracChangeset
for help on using the changeset viewer.