Changeset 5299


Ignore:
Timestamp:
2003-08-27T15:10:29+12:00 (21 years ago)
Author:
jmt12
Message:

Fixed 203B029 - Home folder is now available where available ;)

File:
1 edited

Legend:

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

    r5252 r5299  
    189189    // We set the closing thread, as it should be the only one who can actually see the collection is closed, at least until the closing thread expires.
    190190    closing_thread = Thread.currentThread();
    191     ///ystem.err.println("Closing collection...");
    192191    // Remove the lock on this file, then remove the collection.
    193192    File lock_file = new File(Utility.getCollectionDir(Gatherer.config.gsdl_path) + collection.getName() + File.separator + LOCK_FILE);
     
    200199    Gatherer.config.setCollectionConfiguration(null);
    201200    Gatherer.g_man.collectionChanged(false);
    202     ///ystem.err.println("Closed collection.");
    203201    // All of the consequences of a close should have been processed by now, so others should now see the collection as non-ready.
    204202    closing_thread = null;
     
    597595    /** Create and return the model behind the workspace tree. Quite an extensive method, as it must first map known greenstone collections, then the local file system and finally any public or private download workspaces. */
    598596    public TreeModel getWorkspace() {
     597    ///ystem.err.println("Get Workspace");
    599598    if(workspace_model != null) {
    600599        return workspace_model;
     
    639638        file_root = null;
    640639    }
     640   
     641    // Now if we can determine user home folder information, generate a 'special mapping' to it
     642    String home_folder_str = System.getProperty("user.home");
     643    if(home_folder_str != null && home_folder_str.length() > 0) {
     644        File home_folder = new File(home_folder_str);
     645        FileNode home_folder_node = new FileNode(home_folder, get("Tree.Home", home_folder.getName()));
     646        workspace_root.insert(home_folder_node);
     647    }
     648
    641649    // If mirroring is enabled show the public and private caches.
    642650    if(Gatherer.config.get("workflow.mirror", false)) {
     
    661669        }
    662670    }
     671    ///ystem.err.println("Returning for getWorkspace()");
    663672    return workspace_model;
    664673    }
Note: See TracChangeset for help on using the changeset viewer.