Changeset 12633


Ignore:
Timestamp:
2006-08-31T15:16:17+12:00 (18 years ago)
Author:
mdewsnip
Message:

Kissed the horrible old plugins.dat and classifiers.dat files goodbye...

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
4 edited

Legend:

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

    r12490 r12633  
    175175        System.err.println("Warning: Unable to make directory: " + collect_directory);
    176176        }
    177 
    178         File plugins_dat_file = new File(getGLIUserDirectoryPath() + "plugins.dat");
    179         if (!plugins_dat_file.exists()) {
    180         JarTools.extractFromJar("plugins.dat", getGLIUserDirectoryPath(), false);
    181         }
    182 
    183         File classifiers_dat_file = new File(getGLIUserDirectoryPath() + "classifiers.dat");
    184         if (!classifiers_dat_file.exists()) {
    185         JarTools.extractFromJar("classifiers.dat", getGLIUserDirectoryPath(), false);
    186         }
    187177    }
    188178
     
    219209    }
    220210
     211    // Delete plugins.dat and classifiers.dat files from previous versions of the GLI (no longer used)
     212    File plugins_dat_file = new File(Gatherer.getGLIUserDirectoryPath() + "plugins.dat");
     213    if (plugins_dat_file.exists()) {
     214        System.err.println("Deleting plugins.dat file...");
     215        Utility.delete(plugins_dat_file);
     216    }
     217    File classifiers_dat_file = new File(Gatherer.getGLIUserDirectoryPath() + "classifiers.dat");
     218    if (classifiers_dat_file.exists()) {
     219        System.err.println("Deleting classifiers.dat file...");
     220        Utility.delete(classifiers_dat_file);
     221    }
     222
    221223    try {
    222224        // Load GLI config file
    223225        new Configuration(getGLIUserDirectoryPath(), gsdl_path, gsdl3_path, gsdl3_src_path, site_name);
    224         if (Configuration.just_updated_config_xml_file) {
    225         // Delete the plugins.dat and classifiers.dat files
    226         PluginManager.clearPluginCache();
    227         ClassifierManager.clearClassifierCache();
    228         }
    229226
    230227        if (GS3) {
    231         // Load Greenstone 3 servelt configuration
     228        // Load Greenstone 3 servlet configuration
    232229        servlet_config = new ServletConfiguration(gsdl3_path);
    233230        }
  • trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java

    r12631 r12633  
    287287    }
    288288
    289     public static boolean clearClassifierCache() {
    290 
    291     DebugStream.println("deleting classifiers.dat");
    292     File class_file = new File(Gatherer.getGLIUserDirectoryPath() + "classifiers.dat");
    293     if (class_file.exists()) {
    294         return Utility.delete(class_file);
    295     }
    296     return true;
    297     }
    298 
    299289
    300290    /** Destructor. */
  • trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java

    r12631 r12633  
    337337    }
    338338    Gatherer.c_man.configurationChanged();
    339     }
    340 
    341     public static boolean clearPluginCache() {
    342 
    343     DebugStream.println("deleting plugins.dat");
    344     File plugin_file = new File(Gatherer.getGLIUserDirectoryPath() + "plugins.dat");
    345     if (plugin_file.exists()) {
    346         return Utility.delete(plugin_file);
    347     }
    348     return true;
    349339    }
    350340
  • trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java

    r12608 r12633  
    717717        Configuration.setLocale("general.locale", Configuration.GENERAL_SETTING, ((DictionaryEntry) language_combobox.getSelectedItem()).getLocale());
    718718        restart_required = true;
    719 
    720         // Delete the plugins.dat and classifiers.dat files
    721         PluginManager.clearPluginCache();
    722         ClassifierManager.clearClassifierCache();
    723719        }
    724720
Note: See TracChangeset for help on using the changeset viewer.