Changeset 19623


Ignore:
Timestamp:
05/27/09 15:13:43 (12 years ago)
Author:
ak19
Message:

when removing RE syntax, need to change double backslash back to single one

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/DirectoryPlugin.pm

    r19516 r19623  
    408408    $local_dirname =~ s/^$base_dir_regexp($os_dirsep)//;
    409409    $local_dirname .= $dirsep;
    410 
     410   
    411411    if (defined $self->{'subdir_extrametakeys'}->{$local_dirname}) {
    412412    my $extrakeys = $self->{'subdir_extrametakeys'}->{$local_dirname};
     
    452452    foreach my $ek (@extrametakeys) {
    453453    my ($subdir_re,$extrakey_dir) = &File::Basename::fileparse($ek);
    454     $extrakey_dir =~ s/\\\./\./g; # remove RE syntax
     454   
     455    $extrakey_dir =~ s/\\\./\./g; # remove RE syntax for .
     456    $extrakey_dir =~ s/\\\\/\\/g; # remove RE syntax for \
    455457
    456458    my $dirsep_re = &util::get_re_dirsep();
    457459
    458460    my $ek_non_re = $ek;
    459     $ek_non_re =~ s/\\\./\./g; # remove RE syntax
    460 
     461    $ek_non_re =~ s/\\\./\./g; # remove RE syntax for .
     462    $ek_non_re =~ s/\\\\/\\/g; # remove RE syntax for \
    461463    if ($ek_non_re =~ m/$dirsep_re/) { # specifies at least one directory
    462464        my $md = $extrametadata{$ek};
     
    570572    if ($additionalmetadata == 1) {
    571573        foreach my $filespec (@extrametakeys) {
     574       
    572575        ## use the utf8 encoded filename to do the filename comparison
    573576        if ($tmpfile =~ /^$filespec$/) {
Note: See TracChangeset for help on using the changeset viewer.