Changeset 10876

Show
Ignore:
Timestamp:
09.11.2005 14:17:42 (14 years ago)
Author:
kjdon
Message:

added the macros directory to be uploaded along with images directory

Location:
branches/gsdl-2_62-distribution-branch/gli/src/org/greenstone/gatherer
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/gsdl-2_62-distribution-branch/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r10634 r10876  
    619619    { 
    620620    return getCollectionDirectoryPath() + "log" + File.separator; 
     621    } 
     622 
     623    /** Constructs the absolute filename of the collection's macros directory, which should resemble "$GSDLHOME/collect/<col_name>/macros/" 
     624     * @return A <strong>String</strong> containing the filename. 
     625     */ 
     626    public String getCollectionMacrosDirectoryPath() 
     627    { 
     628    return getCollectionDirectoryPath() + "macros" + File.separator; 
    621629    } 
    622630 
  • branches/gsdl-2_62-distribution-branch/gli/src/org/greenstone/gatherer/shell/GShell.java

    r10342 r10876  
    281281            System.err.println("collect_directory_path: " + collect_directory_path); 
    282282            System.err.println("col_name: " + col_name); 
     283        } 
     284        File macro_dir = new File(Gatherer.c_man.getCollectionMacrosDirectoryPath()); 
     285        if (macro_dir.exists() && macro_dir.list().length > 0) { 
     286            // upload images/ directory to server 
     287            if(hasSignalledStop()) { return; } 
     288            ZipTools.zipup(collect_directory_path, col_name, "macros", this, "", ""); 
     289 
     290            if(hasSignalledStop()) { return; } 
     291            RemoteGreenstoneServer.upload_url_zip(col_name, "macros", "", this); 
     292 
    283293        } 
    284294