Changeset 18946

Show
Ignore:
Timestamp:
14.04.2009 14:33:28 (10 years ago)
Author:
kjdon
Message:

check the config file for collectgroup before checking whether the metadata directory exists - collectgroups aren't likely to have this

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java

    r18370 r18946  
    217217        for (int s=0; s<sites.length; s++) { 
    218218        String site_name = sites[s].getName(); 
    219         System.err.println("found site "+site_name); 
    220219        File collect_folder = new File(Utility.getCollectDir(Configuration.gsdl3_path, site_name) ); 
    221220        if (!collect_folder.exists()) { 
     
    282281    protected void load_collection_configs(TreeSet data, File collect_directory) { 
    283282 
    284         File[] collection_folders = collect_directory.listFiles(); 
     283        File[] collection_folders = collect_directory.listFiles(); 
    285284 
    286285        for(int i = 0; i < collection_folders.length; i++) { 
     
    300299            File config_file = new File(collection_folder, file_name); 
    301300            File collection_metadata_directory = new File(collection_folder, "metadata"); 
    302             if (collection_metadata_directory.exists() && config_file.exists()) { 
     301            if (config_file.exists()) { 
    303302            BasicCollectionConfiguration collection_configuration = new BasicCollectionConfiguration(config_file); 
    304303 
     
    310309            } 
    311310            else { 
    312                 data.add(collection_configuration); 
     311                // if we have a metadata directory, then its a valid collection 
     312                if (collection_metadata_directory.exists()) { 
     313                data.add(collection_configuration); 
     314                } 
    313315            } 
    314316            }