Changeset 37736 for main


Ignore:
Timestamp:
2023-05-04T22:46:17+12:00 (12 months ago)
Author:
davidb
Message:

When testing incremental addition with a manifest file on Linux, it was found that the 'lc()' RE caused issues with working out which files have previously been seen or not. The test collection happened to use .JPG for its images. The resulted in all the images being reprocessed again, as they did not match what was stored in the archive's DB file. Based on the comment that was already there that detailed wy the lc() was being used (to do with testing on Windows with diffcol), it was decided to let the lc() remain if on Windows but to not do this when on non-Windows systems (Linux, MacOS) as these file systems definitely are case-sensitive (whereas Windows is typically case sensitive these days, but not always, especially if we are changing filenames back to DOS shortened versions, as is done in part of the Greenstone Perl code)

File:
1 edited

Legend:

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

    r37131 r37736  
    17341734        $path =~ s/^$re_path/$placeholder/; #case sensitive or not?
    17351735        #$path =~ s/^[\\\/]//; # remove gs_path's trailing separator left behind at the start of the path
    1736         # lowercase file extension, This is needed when shortfilenames are used, as case affects alphetical ordering, which affects diffcol     
    1737         $path =~ s/\.([A-Z]+)$/".".lc($1)/e;
     1736
     1737        if (($ENV{'GSDLOS'} =~ m/^windows$/i) && ($^O ne "cygwin")) {       
     1738        # lowercase file extension, This is needed when shortfilenames are used, as case affects alphetical ordering, which affects diffcol
     1739
     1740        # Note: the following used be done on all Operating Systems, even though the reason for it seems to be related to Windows
     1741        #   (which, when in its most basic form, is case-insenstive for its filesystem)
     1742        #   However, making the file-extension be lower-case cases incremental importing to break on Unix systems
     1743       
     1744        $path =~ s/\.([A-Z]+)$/".".lc($1)/e;
     1745        }
     1746       
    17381747        last; # done
    17391748    }
Note: See TracChangeset for help on using the changeset viewer.