Changeset 36471


Ignore:
Timestamp:
2022-08-24T15:25:40+12:00 (20 months ago)
Author:
anupama
Message:

Dr Bainbridge's suggested bugfix worked: when incremental-building on windows, deleting items when the collection had a longer filename like manifest-demo-e failed with warnings from gdbm_delete about item for filepath as delete key not being found. Deleting worked in collections with shorter filenames (ultimately, full path to files being deleted were shorter). As Dr Bainbridge suggested, it merely required ensure that we compare fll/long filenames with what's in the database, as windows shortfilenames won't hit a match. Fix is a call to util::upgrade_if_dos_filename() to ensure we compare apples with apples. Tested on Windows binary GS2 installation and it worked, but copied the line to linux GS2 install as it's an SVNinstall and will allow me to commit.

File:
1 edited

Legend:

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

    r32848 r36471  
    761761        : &FileUtils::filenameConcatenate($importdir,$df);
    762762
     763        # gdb doesn't store short filenames, so ensure we specify full filenames for deletion
     764        $full_df = &util::upgrade_if_dos_filename($full_df); # will only do something on windows
     765       
    763766        if (-d $full_df) {
    764767        &add_dir_contents_to_list($full_df, \@full_deleted_files);
Note: See TracChangeset for help on using the changeset viewer.