Changeset 25743

Show
Ignore:
Timestamp:
05.06.2012 13:40:28 (7 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

Files:
1 modified

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/;