Ignore:
Timestamp:
2008-08-08T10:10:24+12:00 (16 years ago)
Author:
davidb
Message:

Minor tweak to EmailPlugin to avoid directories that match \d+ being confused as e-mail files

File:
1 edited

Legend:

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

    r16341 r16677  
    141141sub get_default_split_exp {
    142142    return q^\nFrom .*\d{4}\n^;
     143   
     144}
     145
     146sub can_process_this_file {
     147    my $self = shift(@_);
     148    my ($filename) = @_;
     149
     150    # avoid any confusion between filenames matching \d+ (which are by default
     151    # matched by EmailPlugin) and directories that match \d+ (which should not)
     152
     153    return 0 if (-d $filename);
     154
     155    if ($self->{'process_exp'} ne "" && $filename =~ /$self->{'process_exp'}/) {
     156    return 1;
     157    }
     158    return 0;
    143159   
    144160}
Note: See TracChangeset for help on using the changeset viewer.