Changeset 4390


Ignore:
Timestamp:
2003-05-28T13:44:50+12:00 (21 years ago)
Author:
jmt12
Message:

Changed getWorkspace a tiny bit.

File:
1 edited

Legend:

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

    r4371 r4390  
    546546    public TreeModel getRecordSet() {
    547547    if(collection_model == null && collection != null) {
    548                 // Check if the gimport directory exists, and if so use it.
     548        // Check if the gimport directory exists, and if so use it.
    549549        File gimport_directory = new File(getCollectionImport());
    550550        if(gimport_directory.exists()) {
     
    558558        collection_model = new FileSystemModel(new FileNode(new File(getCollectionOldImport()), false));
    559559        }
    560                 // Ensure that the manager is a change listener for the tree.
     560        // Ensure that the manager is a change listener for the tree.
    561561        if(fm_tree_model_listener == null) {
    562562        fm_tree_model_listener = new FMTreeModelListener();
     
    570570    if(workspace_model != null) {
    571571        return workspace_model;
     572    }
     573    // Determine the local collection directory if any
     574    String current_collection_directory = null;
     575    if(collection != null) {
     576        current_collection_directory = Utility.getCollectionDir(Gatherer.config.gsdl_path) + collection.getName();
    572577    }
    573578    // Create the workspace tree.
     
    584589    // We add their import and gimport directories, but only if its not our current collection.
    585590    for(int i = 0; cols != null && i < cols.length; i++) {
    586         if(collection == null || !(Utility.getCollectionDir(Gatherer.config.gsdl_path) + collection.getName()).equals(cols[i].getAbsolutePath())) {
     591        if(collection == null || !current_collection_directory.equals(cols[i].getAbsolutePath())) {
    587592        File dirs[] = cols[i].listFiles();
    588593        ArrayTools.sort(dirs);
     
    610615        workspace_root.insert(file_root);
    611616        }
    612                 // Otherwise build a dummy node which has these nodes as
    613                 // children.
     617        // Otherwise build a dummy node which has these nodes as children.
    614618        else {
    615619        file_root = new FileNode(name);
Note: See TracChangeset for help on using the changeset viewer.