Changeset 9894


Ignore:
Timestamp:
2005-05-17T13:14:52+12:00 (19 years ago)
Author:
davidb
Message:

Code was hardwired to work only in "collect/" directory. This restriction
has been removed.

Location:
trunk/gli/src/org/greenstone/gatherer/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r9884 r9894  
    818818    static public boolean zipup(String col_dir, String col_name, String dir_or_file, GShell source, String accept_expr, String reject_expr)
    819819    {
     820    if (!col_dir.endsWith(File.separator)) {
     821        col_dir += File.separator;
     822    }
     823
    820824    int prefix_strip = col_dir.length();
    821825    boolean encountered_file = false;
     
    872876    static public void unzip(String col_dir, String col_name)
    873877    {
     878    if (!col_dir.endsWith(File.separator)) {
     879        col_dir += File.separator;
     880    }
     881
    874882    String zip_fname = col_dir + col_name + ".zip";
    875883    int zip_mode = ZipFile.OPEN_READ | ZipFile.OPEN_DELETE;
  • trunk/gli/src/org/greenstone/gatherer/util/Zipup.java

    r9314 r9894  
    6262   
    6363    boolean metadata_only = false;
    64     String gsdl_home = args[0];
     64    String base_dir = args[0];
    6565    String collection = args[1];
    6666    String directory = args[2];
     
    8888        }
    8989    }     
    90            
    91     Utility.zipup(gsdl_home + "collect/", collection, directory, null, accept_expr, reject_expr);
     90
     91    Utility.zipup(base_dir, collection, directory, null, accept_expr, reject_expr);
    9292    }
    9393}
Note: See TracChangeset for help on using the changeset viewer.