Changeset 31475 for main/trunk


Ignore:
Timestamp:
2017-03-09T14:30:41+13:00 (7 years ago)
Author:
kjdon
Message:

block_filename moved to EncodingUtil plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/util.pm

    r31443 r31475  
    831831
    832832    return $filename_full_path;
    833 }
    834 
    835 sub block_filename
    836 {
    837     my ($block_hash,$filename) = @_;
    838    
    839     if (($ENV{'GSDLOS'} =~ m/^windows$/) && ($^O ne "cygwin")) {
    840        # block hash contains long names, lets make sure that we were passed a long name
    841        $filename = &util::upgrade_if_dos_filename($filename);
    842        # lower case the entire thing, eg for cover.jpg when its actually cover.JPG
    843        my $lower_filename = lc($filename);
    844        $block_hash->{'file_blocks'}->{$lower_filename} = 1;
    845    
    846 #   my $lower_drive = $filename;
    847 #   $lower_drive =~ s/^([A-Z]):/\l$1:/i;
    848    
    849 #   my $upper_drive = $filename;
    850 #   $upper_drive =~ s/^([A-Z]):/\u$1:/i;
    851 #   
    852 #   $block_hash->{'file_blocks'}->{$lower_drive} = 1;
    853 #   $block_hash->{'file_blocks'}->{$upper_drive} = 1;       
    854     }
    855     else {
    856     $block_hash->{'file_blocks'}->{$filename} = 1;
    857     }
    858833}
    859834
Note: See TracChangeset for help on using the changeset viewer.