Changeset 2029


Ignore:
Timestamp:
2001-02-20T16:12:55+13:00 (23 years ago)
Author:
jrm21
Message:

Return 0 instead of "" on error in read() so that RecPlug can continue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/ConvertToPlug.pm

    r2027 r2029  
    198198
    199199
    200 
    201 # Override BasPlug read_file
    202 
    203 sub read_file {
    204     my $self = shift (@_);
    205     my ($src_filename, $encoding, $textref) = @_;
    206 
    207     my $output_ext = $self->{'convert_to_ext'};
    208     my $conv_filename = $self->tmp_area_convert_file($output_ext,$src_filename);
    209     if ("$conv_filename" eq "") {return "";} # allows continue on errors
    210     $self->{'conv_filename'} = $conv_filename;
    211 
    212     BasPlug::read_file($self,$conv_filename, $encoding, $textref);
    213 }
    214200
    215201
     
    234220    $file =~ s/^[\/\\]+//; # $file often begins with / so we'll tidy it up
    235221
    236 
    237222    # read in file ($text will be in utf8)
    238223    my $text = "";
    239 #    $self->read_file ($filename, $encoding, \$text);
    240 ### was read_file
    241 #    my $self = shift (@_);
    242 #    my ($src_filename, $encoding, $textref) = @_;
    243224
    244225    my $output_ext = $self->{'convert_to_ext'};
    245226    my $conv_filename = $self->tmp_area_convert_file($output_ext,$filename);
    246 # change following to return undef?
    247     if ("$conv_filename" eq "") {return "";} # allows continue on errors
     227    if ("$conv_filename" eq "") {return 0;} # allows continue on errors
    248228    $self->{'conv_filename'} = $conv_filename;
    249 
    250 ### was read_file
    251 
    252 
    253 
    254229
    255230# Do encoding stuff
Note: See TracChangeset for help on using the changeset viewer.