Ignore:
Timestamp:
2010-07-20T17:01:04+12:00 (14 years ago)
Author:
ak19
Message:

3rd commit to do with getting Remote GLI to work with colgroups: changes to GLI code to adjust for instances where the collection group and tail names need to be carefully used to get the zip file path and zip file name right.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r22410 r22454  
    12061206    File collection_file = new File(location);
    12071207
     1208    //String collection_name = collection_directory.getName();
     1209    String collection_name = "";       
    12081210    File collection_directory = collection_file.getParentFile();
    1209     String collection_name = collection_directory.getName();
     1211
     1212    // To get colname = (colgroup/)coltailname, subtract Gatherer.getCollectDirectoryPath() from collection_directory:
     1213    int index = collection_directory.getAbsolutePath().indexOf(Gatherer.getCollectDirectoryPath());
     1214    if(index == -1) {
     1215        System.err.println("*** ERROR: collection directory " + collection_directory + " is not located in collect folder: " + Gatherer.getCollectDirectoryPath());
     1216    } else {
     1217        index += Gatherer.getCollectDirectoryPath().length();       
     1218        collection_name = collection_directory.getAbsolutePath().substring(index);
     1219    }
    12101220
    12111221    if (Gatherer.isGsdlRemote) {
Note: See TracChangeset for help on using the changeset viewer.