Changeset 4391
- Timestamp:
- 2003-05-28T13:45:50+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/file/FileNode.java
r4386 r4391 6 6 import javax.swing.filechooser.*; 7 7 import javax.swing.tree.*; 8 import org.greenstone.gatherer.Gatherer; 8 9 import org.greenstone.gatherer.file.FileFilter; 9 10 import org.greenstone.gatherer.file.FileSystemModel; 10 11 import org.greenstone.gatherer.util.ArrayTools; 12 import org.greenstone.gatherer.util.Utility; 11 13 12 14 public class FileNode … … 233 235 // Only map if there are no children. 234 236 if(children == null && file != null && getAllowsChildren()) { 235 237 ///ystem.err.println("Map: " + this); 236 238 children = new ArrayList(); 237 239 File[] files = file.listFiles(); … … 243 245 files = tools.filter(files, filters[i].filter, filters[i].exclude); 244 246 } 247 // If this node just happens to be the greenstone collection 248 if(Gatherer.c_man != null && Gatherer.c_man.ready() && file.equals(new File(Utility.getCollectionDir(Gatherer.config.gsdl_path)))) { 249 // Preclude the directory of any open collection 250 String collection_name = Gatherer.c_man.getCollection().getName(); 251 for(int j = 0; collection_name != null && files != null && j < files.length; j++) { 252 if(files[j].getName().equals(collection_name)) { 253 // Remove the offending directory 254 files = ArrayTools.remove(files, j); 255 collection_name = null; // Only have to do this once. 256 } 257 } 258 } 245 259 // Sort the remaining files. 246 260 tools.sort(files, true);
Note:
See TracChangeset
for help on using the changeset viewer.