Ignore:
Timestamp:
10/17/13 17:03:50 (7 years ago)
Author:
davidb
Message:

Support for Cygwin added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm

    r27306 r28489  
    220220    return undef unless $self->can_process_this_file($filename_full_path);   
    221221
    222     if ($ENV{'GSDLOS'} =~ m/^windows$/) {
    223        
    224         my $lower_drive = $filename_full_path;
    225         $lower_drive =~ s/^([A-Z]):/\l$1:/i;
    226        
    227         my $upper_drive = $filename_full_path;
    228         $upper_drive =~ s/^([A-Z]):/\u$1:/i;
    229        
    230         $block_hash->{'metadata_files'}->{$lower_drive} = 1;
    231         $block_hash->{'metadata_files'}->{$upper_drive} = 1;       
    232     }
    233     else {
    234         $block_hash->{'metadata_files'}->{$filename_full_path} = 1;
    235     }
     222    if (($ENV{'GSDLOS'} =~ m/^windows$/) && ($^O ne "cygwin")) {
     223   
     224    my $lower_drive = $filename_full_path;
     225    $lower_drive =~ s/^([A-Z]):/\l$1:/i;
     226   
     227    my $upper_drive = $filename_full_path;
     228    $upper_drive =~ s/^([A-Z]):/\u$1:/i;
     229   
     230    $block_hash->{'metadata_files'}->{$lower_drive} = 1;
     231    $block_hash->{'metadata_files'}->{$upper_drive} = 1;       
     232    }
     233    else {
     234    $block_hash->{'metadata_files'}->{$filename_full_path} = 1;
     235    }
    236236
    237237    return 1;
Note: See TracChangeset for help on using the changeset viewer.