Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorporaDirectory.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorporaDirectory.java	(revision 2196)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorporaDirectory.java	(revision 2197)
@@ -92,7 +92,7 @@
 		if (dialog.open() != null) {
 
 			File directory = new File(dialog.getFilterPath());
-			
+
 			if (directory.exists()) {
 				LastOpened.set(ID, directory);
 				JobHandler job = loadBinaryCorpusFromCorporaDirectory(directory, true, true, false);
@@ -116,36 +116,36 @@
 	 * @return
 	 */
 	public static JobHandler loadBinaryCorpusFromCorporaDirectory(final File directory, final boolean askSelection, final boolean replace, final boolean loadDirectories) {
-		
+
 		JobHandler jobhandler = new JobHandler(NLS.bind(TXMUIMessages.LoadBinaryCorporaDirectory_loadingCorporaFromTheP0Directory, directory), true) {
-			
+
 			JobHandler self = this;
 			@Override
 			protected IStatus run(final IProgressMonitor monitor) {
 				this.runInit(monitor);
 
-//				try {
-//					SearchEnginesManager.getCQPSearchEngine().stop();
-//				} catch (Exception e1) {
-//					// TODO Auto-generated catch block
-//					e1.printStackTrace();
-//				}
-				
+				//				try {
+				//					SearchEnginesManager.getCQPSearchEngine().stop();
+				//				} catch (Exception e1) {
+				//					// TODO Auto-generated catch block
+				//					e1.printStackTrace();
+				//				}
+
 				File corporaDirectory = new File(Toolbox.getTxmHomePath(), "corpora"); //$NON-NLS-1$
 				if (!corporaDirectory.exists()) {
 					Log.severe(TXMUIMessages.LoadBinaryCorporaDirectory_corporaDirectoryNotFoundAborting);
-//					try {
-//						SearchEnginesManager.getCQPSearchEngine().start(null);
-//					} catch (Exception e) {
-//						// TODO Auto-generated catch block
-//						e.printStackTrace();
-//					}
+					//					try {
+					//						SearchEnginesManager.getCQPSearchEngine().start(null);
+					//					} catch (Exception e) {
+					//						// TODO Auto-generated catch block
+					//						e.printStackTrace();
+					//					}
 					return Status.CANCEL_STATUS;
 				}
-				
+
 				final ArrayList<Project> newProjects = new ArrayList<Project>();
 				if (askSelection) {
-					
+
 					this.syncExec(new Runnable() {
 						@Override
 						public void run() {
@@ -156,7 +156,7 @@
 							}
 						}
 					});
-					
+
 				} else { // try loading corpora and dont replace existing corpus
 					List<File>  files = Arrays.asList(getBinaryCorpusFiles(directory, loadDirectories));
 					ArrayList<Project> tmp = loadBinaryCorpusFromCorporaDirectory(files, this, monitor, replace);
@@ -165,13 +165,13 @@
 					}
 				}
 
-//				this.acquireSemaphore();
-//				try {
-//					SearchEnginesManager.getCQPSearchEngine().start(null);
-//				} catch (Exception e) {
-//					e.printStackTrace();
-//				}
-//				this.releaseSemaphore();
+				//				this.acquireSemaphore();
+				//				try {
+				//					SearchEnginesManager.getCQPSearchEngine().start(null);
+				//				} catch (Exception e) {
+				//					e.printStackTrace();
+				//				}
+				//				this.releaseSemaphore();
 
 				for (Project newProject2 : newProjects) {
 					try {
@@ -183,7 +183,7 @@
 				if (newProjects.size() > 0) {
 					System.out.println(NLS.bind(TXMUIMessages.P0CorpusLoaded, newProjects.size()));
 				}
-				
+
 				this.syncExec(new Runnable() {
 					@Override
 					public void run() {
@@ -191,7 +191,7 @@
 						StatusLine.setMessage(TXMUIMessages.info_txmIsReady);
 					}
 				});
-				
+
 				return Status.OK_STATUS;
 			}
 		};
@@ -199,14 +199,14 @@
 		jobhandler.schedule();
 		return jobhandler;
 	}
-	
+
 	protected static List<File> getBinaryCorpusSelection(File directory, boolean loadDirectories) {
 		ArrayList<File> selectedFiles = new ArrayList<File>();;
 		if (!directory.isDirectory()) return selectedFiles;
 		if (!directory.exists()) return selectedFiles;
-		
+
 		Shell shell = null;
-		
+
 		if (Display.getCurrent() != null) {
 			shell = Display.getCurrent().getActiveShell();
 		} else if (Display.getDefault() == null) {
@@ -217,15 +217,15 @@
 			return selectedFiles;
 		}
 		File[] files = getBinaryCorpusFiles(directory, loadDirectories);
-		
+
 		ListSelectionDialog lsd = new ListSelectionDialog(shell, files, new ArrayContentProvider(), new LabelProvider() {
 
 			@Override
 			public String getText(Object element) {
 				if (element == null) return "error";//$NON-NLS-1$
-				
+
 				if (!(element instanceof File)) return "not a file ("+element+")";//$NON-NLS-1$ //$NON-NLS-2$
-				
+
 				File f = (File) element;
 				if (f.isDirectory()) {
 					if (new File(f, ".settings").exists()) {//$NON-NLS-1$
@@ -236,7 +236,7 @@
 				} else if (f.getName().endsWith(".txm")) {//$NON-NLS-1$
 					return Zip.getRoot(f).toUpperCase()+" ("+f+")";//$NON-NLS-1$ //$NON-NLS-2$
 				}
-				
+
 				return "not a txm corpus ("+f+")";//$NON-NLS-1$ //$NON-NLS-2$
 			}
 		}, TXMUIMessages.LoadBinaryCorporaDirectory_selectTheTXMCorpusToLoad);
@@ -248,13 +248,13 @@
 				selectedFiles.add(new File(o.toString()));
 			}
 		}
-		
+
 		return selectedFiles;
 	}
 
 	private static File[] getBinaryCorpusFiles(File directory, boolean loadDirectories) {
 		File[] files = null;
-		
+
 		if (loadDirectories) {
 			files = directory.listFiles(new FileFilter() {
 				@Override
@@ -270,7 +270,7 @@
 				}
 			});
 		}
-		
+
 		Arrays.sort(files, new Comparator<File>() {
 			@Override
 			public int compare(File o1, File o2) {
@@ -281,7 +281,7 @@
 				return i;
 			}
 		});
-		
+
 		return files;
 	}
 
@@ -309,57 +309,62 @@
 	 * @return the loaded projects
 	 */
 	protected static ArrayList<Project> loadBinaryCorpusFromCorporaDirectory(List<File> corporaFiles, JobHandler job, IProgressMonitor monitor, boolean replace) {
-		
+
 		ArrayList<Project> projects = new ArrayList<Project>();
-		
+
 		try {
-			
-//			SearchEngine engine = SearchEnginesManager.getCQPSearchEngine();
-//			if (engine.isRunning()) {
-//				engine.stop();
-//			}
-			
+
+			//			SearchEngine engine = SearchEnginesManager.getCQPSearchEngine();
+			//			if (engine.isRunning()) {
+			//				engine.stop();
+			//			}
+
 			monitor.beginTask(TXMUIMessages.loadingBinaryCorpus, 100);
 			job.acquireSemaphore();
-//			Toolbox.getEngineManager(EngineType.SEARCH).stopEngines();
+			//			Toolbox.getEngineManager(EngineType.SEARCH).stopEngines();
 			job.releaseSemaphore();
 
 			monitor.subTask(TXMUIMessages.loadingTheCorpusInThePlatform);
 			for (File corpusDirectory : corporaFiles) {
-				if (corpusDirectory.isHidden()) {
-					continue;
+				try {
+					if (corpusDirectory.isHidden()) {
+						continue;
+					}
+
+					Project project = Toolbox.workspace.getProject(corpusDirectory.getName().toUpperCase());
+					if (project != null) {
+						Log.warning(TXMCoreMessages.bind(TXMUIMessages.LoadBinaryCorporaDirectory_aCorpusNamedP0alreadyExistsLoadingOfP1Canceled, corpusDirectory.getName().toUpperCase(), corpusDirectory));
+						continue;
+					}
+
+					if (corpusDirectory.isDirectory()) {
+						project = LoadBinaryCorpus.loadBinaryCorpusAsDirectory(corpusDirectory, monitor, replace);
+					} else {
+						project = LoadBinaryCorpus.loadBinaryCorpusArchive(corpusDirectory, job, monitor, replace);
+					}
+
+					//				Project base = LoadBinaryCorpus.loadBinaryCorpusAsDirectory(corpusDirectory);
+					if (project == null) {
+						//Log.warning("Failed to load binary corpus: "+corpusDirectory);
+					} else {
+						projects.add(project);
+						project.save();
+					}
+				} catch (Exception e2) {
+					Log.warning("Could not load corpus from "+corpusDirectory+": "+e2);
+					Log.printStackTrace(e2);
 				}
-				
-				Project project = Toolbox.workspace.getProject(corpusDirectory.getName().toUpperCase());
-				if (project != null) {
-					Log.warning(TXMCoreMessages.bind(TXMUIMessages.LoadBinaryCorporaDirectory_aCorpusNamedP0alreadyExistsLoadingOfP1Canceled, corpusDirectory.getName().toUpperCase(), corpusDirectory));
-					continue;
-				}
-				
-				if (corpusDirectory.isDirectory()) {
-					project = LoadBinaryCorpus.loadBinaryCorpusAsDirectory(corpusDirectory, monitor, replace);
-				} else {
-					project = LoadBinaryCorpus.loadBinaryCorpusArchive(corpusDirectory, job, monitor, replace);
-				}
-				
-//				Project base = LoadBinaryCorpus.loadBinaryCorpusAsDirectory(corpusDirectory);
-				if (project == null) {
-					//Log.warning("Failed to load binary corpus: "+corpusDirectory);
-				} else {
-					projects.add(project);
-					project.save();
-				}
 			}
 
 			monitor.subTask(TXMUIMessages.restartingThePlatform);
-			
+
 		} catch (ThreadDeath td) { 
 		} catch (Exception e2) {
 			org.txm.utils.logger.Log.printStackTrace(e2);
 		} finally {
 			monitor.done();
 		}
-		
+
 		return projects;
 	}
 }
\ No newline at end of file
