Changeset 24829 for main/trunk/greenstone2/perllib/plugouts
- Timestamp:
- 2011-11-30T17:48:15+13:00 (12 years ago)
- Location:
- main/trunk/greenstone2/perllib/plugouts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugouts/BasePlugout.pm
r24404 r24829 735 735 # if (defined $collect_dir) { 736 736 # 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() 738 738 # $collect_dir_re_safe =~ s/\./\\./g;## 739 739 -
main/trunk/greenstone2/perllib/plugouts/DSpacePlugout.pm
r24402 r24829 300 300 $real_filename =~ s/^\\(.*)/$1/i; 301 301 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); 305 304 if ($real_filename =~ m/$escaped_source_filename$/) { 306 305 next; -
main/trunk/greenstone2/perllib/plugouts/FedoraMETSPlugout.pm
r22465 r24829 613 613 614 614 my $gsdl_href = &util::filename_cat($working_dir, $fname); 615 $collectparent = ~ s/\\/\\\\/g;# escape reserved metacharacter \ in path (by replacing it with \\) for substitution615 $collectparent = &util::filename_to_regex($collectparent); # escape reserved metacharacter \ in path (by replacing it with \\) for substitution 616 616 $gsdl_href =~ s/^$collectparent(\/|\\)?//; # remove the collectparent path in gsdl_href and any trailing slash 617 617 $gsdl_href =~ s/\\/\//g; # make sure we have url paths (which only use / not \) … … 744 744 745 745 my $gsdl_href = &util::filename_cat($working_dir,$assfilePath); 746 $collectparent = ~ s/\\/\\\\/g;# escape reserved metacharacter \ in path (by replacing it with \\) for substitution746 $collectparent = &util::filename_to_regex($collectparent); # escape reserved metacharacter \ in path (by replacing it with \\) for substitution 747 747 $gsdl_href =~ s/^$collectparent(\/|\\)?//; # remove the collectparent path in gsdl_href and any trailing slash 748 748 $gsdl_href =~ s/\\/\//g; # make sure we have url paths (which only use / not \)
Note:
See TracChangeset
for help on using the changeset viewer.