Changeset 24940


Ignore:
Timestamp:
01/11/12 14:27:20 (9 years ago)
Author:
ak19
Message:

Dr Bainbridge discovered a logic error in the order of steps in unregex_filename. These steps should be in reverse order of filename_to_regex.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/util.pm

    r24932 r24940  
    855855
    856856    # need to put doubled backslashes for regex back to single
    857     $filename =~ s/\\\\/\\/g; # remove RE syntax for \   
    858857    $filename =~ s/\\\./\./g; # remove RE syntax for .
    859858    $filename =~ s@\\\(@(@g; # remove RE syntax for ( => "\(" turns into "("
     
    861860    $filename =~ s@\\\[@[@g; # remove RE syntax for [ => "\[" turns into "["
    862861    $filename =~ s@\\\]@]@g; # remove RE syntax for ] => "\]" turns into "]"
     862   
     863    # \\ goes to \
     864    # This is the last step in reverse mirroring the order of steps in filename_to_regex()
     865    $filename =~ s/\\\\/\\/g; # remove RE syntax for \   
    863866    return $filename;
    864867}
Note: See TracChangeset for help on using the changeset viewer.