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/remote/RemoteGreenstoneServerAction.java

    r22410 r22454  
    350350        download_collection_file_command += "&file=" + URLEncoder.encode(collection_file_relative_path, "UTF-8");
    351351        download_collection_file_command += "&lr=" + remote.lang_region;
    352         String zip_file_name = collection_name + "-" + collection_file.getName() + ".zip";
    353         String zip_file_path = collection_directory_path + zip_file_name;
     352
     353        // String zip_file_name = collection_name + "-" + collection_file.getName() + ".zip";
     354        // String zip_file_path = collection_directory_path + zip_file_name;       
     355        String zip_file_path = Gatherer.getCollectDirectoryPath() + collection_name + "-" + collection_file.getName() + ".zip"; // collect/(colgroup/)coltail/colfile.zip
    354356        action_output = remote.downloadFile(download_collection_file_command, zip_file_path);
    355357
     
    582584
    583585        // Zip up the files to send to the server
    584         String zip_file_name = collection_name + "-" + System.currentTimeMillis() + ".zip";
    585         String zip_file_path = collection_directory_path + zip_file_name;
     586        //String zip_file_name = collection_name + "-" + System.currentTimeMillis() + ".zip";
     587            //String zip_file_path = collection_directory_path + zip_file_name;
     588        String zip_file_path = collection_directory_path; // collect/(colgroup/)coltail/
     589        String zip_file_name = new File(zip_file_path).getName() + "-" + System.currentTimeMillis() + ".zip"; // <collection_tail_name>-<time>.zip
     590        zip_file_path += zip_file_name; // collect/(colgroup/)coltail/coltail-time.zip
    586591        ZipTools.zipFiles(zip_file_path, collection_directory_path, collection_file_relative_paths);
    587592       
     
    628633        progress_bar.setAction("Uploading files into collection...");
    629634       
    630         String zip_file_name = collection_name + "-" + System.currentTimeMillis() + ".zip";
    631         String zip_file_path = Gatherer.getCollectDirectoryPath() + zip_file_name;
     635        //String zip_file_name = collection_name + "-" + System.currentTimeMillis() + ".zip";
     636        //String zip_file_path = Gatherer.getCollectDirectoryPath() + zip_file_name;
     637        String zip_file_path = Gatherer.getCollectDirectoryPath()
     638        + collection_name + "-" + System.currentTimeMillis() + ".zip"; // "collect/(colgroup/)collection_tail_name-<time>.zip"
     639        String zip_file_name = new File(zip_file_path).getName(); // "collection_tail_name-<time>.zip"
    632640        DebugStream.println("Zip file path: " + zip_file_path);
    633641
Note: See TracChangeset for help on using the changeset viewer.