Changeset 12633
- Timestamp:
- 2006-08-31T15:16:17+12:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r12490 r12633 175 175 System.err.println("Warning: Unable to make directory: " + collect_directory); 176 176 } 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 }187 177 } 188 178 … … 219 209 } 220 210 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 221 223 try { 222 224 // Load GLI config file 223 225 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 files226 PluginManager.clearPluginCache();227 ClassifierManager.clearClassifierCache();228 }229 226 230 227 if (GS3) { 231 // Load Greenstone 3 serv elt configuration228 // Load Greenstone 3 servlet configuration 232 229 servlet_config = new ServletConfiguration(gsdl3_path); 233 230 } -
trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java
r12631 r12633 287 287 } 288 288 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 299 289 300 290 /** Destructor. */ -
trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java
r12631 r12633 337 337 } 338 338 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;349 339 } 350 340 -
trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java
r12608 r12633 717 717 Configuration.setLocale("general.locale", Configuration.GENERAL_SETTING, ((DictionaryEntry) language_combobox.getSelectedItem()).getLocale()); 718 718 restart_required = true; 719 720 // Delete the plugins.dat and classifiers.dat files721 PluginManager.clearPluginCache();722 ClassifierManager.clearClassifierCache();723 719 } 724 720
Note:
See TracChangeset
for help on using the changeset viewer.