Ignore:
Timestamp:
2011-11-30T17:48:15+13:00 (12 years ago)
Author:
ak19
Message:

Changes to bat files and perl code to deal with brackets in (Windows) filepath. Also checked winmake.bat files to see if changes were needed there. These changes go together with the commits 24826 to 24828 for gems.bat, and commit 24820 on makegs2.bat.

Location:
main/trunk/greenstone2/perllib/plugouts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugouts/BasePlugout.pm

    r24404 r24829  
    735735#       if (defined $collect_dir) {
    736736#       my $collect_dir_re_safe = $collect_dir;
    737 #       $collect_dir_re_safe =~ s/\\/\\\\/g;
     737#       $collect_dir_re_safe =~ s/\\/\\\\/g; # use &util::filename_to_regex()
    738738#       $collect_dir_re_safe =~ s/\./\\./g;##
    739739
  • main/trunk/greenstone2/perllib/plugouts/DSpacePlugout.pm

    r24402 r24829  
    300300    $real_filename =~ s/^\\(.*)/$1/i;
    301301    if (-e $real_filename) {
    302         # escape backslashes in path for upcoming regex match
    303         my $escaped_source_filename = $source_filename;
    304         $escaped_source_filename =~ s/\\/\\\\/g;       
     302        # escape backslashes and brackets in path for upcoming regex match
     303        my $escaped_source_filename = &util::filename_to_regex($source_filename);
    305304        if ($real_filename =~ m/$escaped_source_filename$/) {
    306305        next;
  • main/trunk/greenstone2/perllib/plugouts/FedoraMETSPlugout.pm

    r22465 r24829  
    613613   
    614614    my $gsdl_href = &util::filename_cat($working_dir, $fname);
    615     $collectparent =~ s/\\/\\\\/g;            # escape reserved metacharacter \ in path (by replacing it with \\) for substitution
     615    $collectparent = &util::filename_to_regex($collectparent); # escape reserved metacharacter \ in path (by replacing it with \\) for substitution
    616616    $gsdl_href =~ s/^$collectparent(\/|\\)?//; # remove the collectparent path in gsdl_href and any trailing slash
    617617    $gsdl_href =~ s/\\/\//g;                   # make sure we have url paths (which only use / not \)
     
    744744
    745745           my $gsdl_href = &util::filename_cat($working_dir,$assfilePath);
    746            $collectparent =~ s/\\/\\\\/g;            # escape reserved metacharacter \ in path (by replacing it with \\) for substitution
     746           $collectparent = &util::filename_to_regex($collectparent); # escape reserved metacharacter \ in path (by replacing it with \\) for substitution
    747747           $gsdl_href =~ s/^$collectparent(\/|\\)?//; # remove the collectparent path in gsdl_href and any trailing slash
    748748           $gsdl_href =~ s/\\/\//g;                   # make sure we have url paths (which only use / not \)
Note: See TracChangeset for help on using the changeset viewer.