Changeset 18329 for gsdl

Show
Ignore:
Timestamp:
07.01.2009 18:46:48 (11 years ago)
Author:
ak19
Message:

Subroutine rename_file now returns prematurely if no filename is specified (e.g. empty string). This can happen, as one plugin actually creates a new doc() with an empty string filename which then calls this subroutine with it.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/util.pm

    r18326 r18329  
    999999sub rename_file { 
    10001000    my ($filename, $rename_method)  = @_; 
    1001      
     1001 
     1002    if(!$filename) { # for example, empty string 
     1003    return $filename; 
     1004    } 
     1005   
    10021006    my ($tailname,$dirname,$suffix) = File::Basename::fileparse($filename, "\\.[^\\.]+\$"); 
    10031007