Changeset 18329 for gsdl/trunk/perllib


Ignore:
Timestamp:
2009-01-07T18:46:48+13:00 (15 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.

File:
1 edited

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
Note: See TracChangeset for help on using the changeset viewer.