Changeset 13390 for trunk/gli


Ignore:
Timestamp:
2006-12-01T11:24:14+13:00 (17 years ago)
Author:
mdewsnip
Message:

(Remote building) Now includes the archives.inf file in the collection archives zip file, to prevent a completely empty zip file if no files were imported.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/remote/ZipCollectionArchives.java

    r13328 r13390  
    5050    public boolean shouldIncludeFile(String relative_file_path)
    5151    {
    52         // Only doc.xml files are included
    53         return (relative_file_path.equals("doc.xml") || relative_file_path.endsWith(File.separator + "doc.xml"));
     52        // Only doc.xml files are strictly required, but we include archives.inf as well to prevent
     53        //   errors when zipping up the archives of a collection where no files were imported
     54        //   (in this case the zip file would contain nothing at all)
     55        return (relative_file_path.equals("archives.inf") || relative_file_path.endsWith(File.separator + "archives.inf") || relative_file_path.equals("doc.xml") || relative_file_path.endsWith(File.separator + "doc.xml"));
    5456    }
    5557
Note: See TracChangeset for help on using the changeset viewer.