Changeset 31763
- Timestamp:
- 2017-06-29T18:18:06+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/UnknownConverterPlugin.pm
r31762 r31763 183 183 my ($output_ext, $input_filename, $textref) = @_; 184 184 185 my $plugin_name = $self->{'plugin_type'}; # inherited from BaseImporter186 187 185 #### COPIED FROM ConvertBinaryFile::tmp_area_convert_file() 188 186 my $outhandle = $self->{'outhandle'}; … … 252 250 # running under windows 253 251 if ($ENV{'GSDLOS'} =~ /^windows$/i) { 254 $output_dirname = $tmp_dirname . "\\$utf8_tailname\\" . $utf8_tailname;252 $output_dirname = $tmp_dirname . "\\$utf8_tailname\\"; 255 253 } else { 256 $output_dirname = $tmp_dirname . "\/$utf8_tailname\/" . $utf8_tailname;254 $output_dirname = $tmp_dirname . "\/$utf8_tailname\/"; 257 255 } 258 $output_filename .=".item";256 $output_filename = $output_dirname . $utf8_tailname . ".item"; 259 257 } else { 260 258 $output_filename =~ s/$lc_suffix$/.$output_type/; … … 270 268 # If running the command returns 0, let's assume success and so the act of running the command 271 269 # should produce either a text file or output to stdout. 270 271 my $plugin_name = $self->{'plugin_type'}; # inherited from BaseImporter 272 272 273 273 my $cmd = $self->{'exec_cmd'}; … … 315 315 316 316 317 if(defined $output_dirname && -d $output_dirname) {317 if(defined $output_dirname && ! -d $output_dirname) { 318 318 print $outhandle "$plugin_name Conversion error: Output directory $output_dirname doesn't exist\n"; 319 319 return ""; 320 320 } 321 elsif (! -e$output_filename) {321 elsif (! -f $output_filename) { 322 322 print $outhandle "$plugin_name Conversion error: Output file $output_filename doesn't exist\n"; 323 323 return "";
Note:
See TracChangeset
for help on using the changeset viewer.