Ignore:
Timestamp:
2007-05-07T14:07:30+12:00 (17 years ago)
Author:
xiao
Message:

prevent legacy collections from being opened in gli

File:
1 edited

Legend:

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

    r14045 r14063  
    248248        return;
    249249        }
    250         File[] collection_folders = collect_directory.listFiles();
     250        File[] collection_folders = collect_directory.listFiles();
    251251        for(int i = 0; i < collection_folders.length; i++) {
    252252        File collection_folder = collection_folders[i];
    253253        String collection_foldername = collection_folder.getName();
    254         String file_name = (Gatherer.GS3)? Utility.CONFIG_GS3_FILE : Utility.CONFIG_FILE;
    255254        if(collection_folder.isDirectory() && !collection_foldername.equals(StaticStrings.MODEL_COLLECTION_NAME)) {
     255            // this 'file_name' has already been prefixed by 'etc'
     256            String file_name = (Gatherer.GS3)? Utility.CONFIG_GS3_FILE : Utility.CONFIG_FILE;
    256257            File config_file = new File(collection_folder, file_name);
    257             if (config_file.exists()) {
     258            File collection_metadata_directory = new File(collection_folder, "metadata");
     259            if (collection_metadata_directory.exists() && config_file.exists()) {
    258260            BasicCollectionConfiguration collection_configuration = new BasicCollectionConfiguration(config_file);
    259261            data.add(collection_configuration);
Note: See TracChangeset for help on using the changeset viewer.