Changeset 4390
- Timestamp:
- 2003-05-28T13:44:50+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r4371 r4390 546 546 public TreeModel getRecordSet() { 547 547 if(collection_model == null && collection != null) { 548 548 // Check if the gimport directory exists, and if so use it. 549 549 File gimport_directory = new File(getCollectionImport()); 550 550 if(gimport_directory.exists()) { … … 558 558 collection_model = new FileSystemModel(new FileNode(new File(getCollectionOldImport()), false)); 559 559 } 560 560 // Ensure that the manager is a change listener for the tree. 561 561 if(fm_tree_model_listener == null) { 562 562 fm_tree_model_listener = new FMTreeModelListener(); … … 570 570 if(workspace_model != null) { 571 571 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(); 572 577 } 573 578 // Create the workspace tree. … … 584 589 // We add their import and gimport directories, but only if its not our current collection. 585 590 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())) { 587 592 File dirs[] = cols[i].listFiles(); 588 593 ArrayTools.sort(dirs); … … 610 615 workspace_root.insert(file_root); 611 616 } 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. 614 618 else { 615 619 file_root = new FileNode(name);
Note:
See TracChangeset
for help on using the changeset viewer.