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/bin/script
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/explode_metadata_database.pl

    r24404 r24829  
    412412        my ($field, $value) = (@$pair);
    413413        $field =~ s/^ex\.([^.]+)$/$1/; #remove any ex. iff it's the only metadata set prefix (will leave ex.dc.* intact)
    414         $value =~ s/\\\\/\\/g;
     414        $value =~ s/\\\\/\\/g;         # don't regex brackets () here though!
    415415        my $document_file_full;
    416416
     
    596596    }
    597597    else {
    598         $orig_base_dir =~ s/\\/\\\\/g; # escape windows style slashes for the regex below
     598        $orig_base_dir = &util::filename_to_regex($orig_base_dir); # escape windows style slashes for the regex below       
    599599        if ($document_file_full =~ m/^$orig_base_dir.*/) {
    600600        # file local to metadata record
  • main/trunk/greenstone2/bin/script/schedule.pl

    r21292 r24829  
    208208    $os = $ENV{'GSDLOS'};
    209209    $path = $ENV{'PATH'};
     210   
     211    if("$gsdl" =~ m/(\\\(|\\\)| )/ ) { # () brackets or spaces in path
     212        &gsprintf($out, "\n\n{schedule.filepath_warning}\n\n\n", $gsdl);
     213    }
    210214
    211215    my $service = "schedule";
  • main/trunk/greenstone2/bin/script/wvware.pl

    r24599 r24829  
    333333    my $safe_reg_expression = $assoc_dir_path;
    334334    $safe_reg_expression =~ s/\\/\\\\/g;
     335    $safe_reg_expression =~ s@\(@\\(@g; # escape brackets
     336    $safe_reg_expression =~ s@\)@\\)@g; # escape brackets
    335337    $safe_reg_expression =~ s/\./\\./g;
    336338    $safe_reg_expression =~ s/\-/\\-/g;
Note: See TracChangeset for help on using the changeset viewer.