Changeset 25743


Ignore:
Timestamp:
2012-06-05T13:40:28+12:00 (12 years ago)
Author:
kjdon
Message:

if we happen to have a file and matching process expression that doesn't have a file extension, eg 'mbox' instead of 'xxx.mbox', then block_cover_image will block the file as replacing .xxx with .jpg will not do anything, and the file will exist and be blocked. So check that we have actually generated a new filename before seeing if it exists

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/BasePlugin.pm

    r25345 r25743  
    438438    $coverfile =~ s/\.[^\\\/\.]+$/\.jpg/;
    439439
     440    #if there is no file extension, coverfile will be the same as filename
     441    return if $coverfile eq $filename;
     442   
    440443    if (!&util::fd_exists($coverfile)) {
    441444        $coverfile =~ s/jpg$/JPG/;
Note: See TracChangeset for help on using the changeset viewer.