Révision 1629

tmp/org.txm.utils/src/org/txm/utils/DeleteDir.java (revision 1629)
28 28
package org.txm.utils;
29 29

  
30 30
import java.io.File;
31
import java.io.FileInputStream;
32
import java.io.FileNotFoundException;
33
import java.nio.channels.FileChannel;
34
import java.nio.channels.FileLock;
31 35
import java.util.ArrayList;
32 36
import java.util.LinkedList;
33 37

  
......
65 69
		try { // try using system for faster reply
66 70
            // prefer OS-dependent directory removal tool
67 71
            if (SystemUtils.IS_OS_WINDOWS) {
68
            	Runtime.getRuntime().exec(new String[]{"%ComSpec%", "/C", "RD /S /Q \"" + path + '"'}).waitFor();
72
            	Runtime.getRuntime().exec(new String[]{"%ComSpec%", "/C", "RD /S /Q \"" + path + '"'}).waitFor(); // FIXME: SJ: "%ComSpec%" is not defined, at least on my Win7
69 73
            } else if (SystemUtils.IS_OS_UNIX) {
70 74
            	Runtime.getRuntime().exec(new String[]{"/bin/rm", "-rf", path.toString()}).waitFor();
71 75
            }
72 76
        } catch (Exception e) {
73 77
            // fallback to internal implementation on error
78
        	//e.printStackTrace();
74 79
        }
75 80
		
76 81
		if (path.exists() && path.isDirectory()) {
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/MemCqiClient.java (revision 1629)
4 4

  
5 5
import org.eclipse.osgi.util.NLS;
6 6
import org.txm.core.messages.TXMCoreMessages;
7
import org.txm.searchengine.core.messages.SearchEngineCoreMessages;
7 8
import org.txm.searchengine.cqp.clientExceptions.UnexpectedAnswerException;
8 9
import org.txm.searchengine.cqp.core.messages.CQPSearchEngineCoreMessages;
9 10
import org.txm.searchengine.cqp.serverException.CqiClErrorCorpusAccess;
......
370 371

  
371 372
	@Override
372 373
	public void dropCorpus(String arg0) throws Exception {
374
		Log.finest(NLS.bind("Deleting corpus {0}...", arg0)); //$NON-NLS-1$
375
		
373 376
		Boolean ret = server.dropCorpus(arg0);
374 377
		if(ret == null || !ret) {
375 378
			throwExceptionFromCqi(server.getErrorCode());
......
378 381

  
379 382
	@Override
380 383
	public void dropSubCorpus(String arg0) throws IOException, UnexpectedAnswerException, CqiServerError {
384
		Log.finest(NLS.bind(SearchEngineCoreMessages.deletingSubcorpusP0, arg0));
385

  
381 386
		Boolean ret = server.dropSubCorpus(arg0);
382 387
		if (ret == null || !ret) {
383 388
			throwExceptionFromCqi(server.getErrorCode());
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CQPCorpus.java (revision 1629)
466 466
	 *             the cqi client exception
467 467
	 */
468 468
	public boolean dropSubcorpus(CQPCorpus subcorpus) throws CqiClientException {
469
		Log.finest(NLS.bind(SearchEngineCoreMessages.deletingSubcorpusP0, subcorpus.getName()));
470 469
		subcorpus.dropAllSubcorpora();
471 470
//		subcorpus.dropAllPartitions();
472 471
		try {

Formats disponibles : Unified diff