Revision 2756

tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java (revision 2756)
830 830
		corporaDir = new File(txmhomedir, "corpora"); //$NON-NLS-1$
831 831
		corporaDir.mkdir();
832 832
		
833
		File previousCorporaDirectory = new File(System.getProperty("user.home"), "TXM/corpora"); //$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-2$
833
		File previous080CorporaDirectory = new File(System.getProperty("user.home"), "TXM-0.8.0/corpora"); //$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-2$
834
		File previous079CorporaDirectory = new File(System.getProperty("user.home"), "TXM/corpora"); //$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-2$
834 835
		
835 836
		Version v = Activator.getDefault().getBundle().getVersion();
836 837
		String vv = v.getMajor() + "." + v.getMinor() + "." + v.getMicro(); //$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-2$
......
873 874
			}
874 875
		});
875 876
		
876
		// move previous TXM 0.8.0 corpora
877
		// move previous TXM 0.8.1 corpora
877 878
		File backupDir = new File(corporaDir.getAbsolutePath() + "-previous"); //$NON-NLS-1$
878 879
		if (corporaDir.exists()) {
879 880
			backupDir.mkdirs();
......
884 885
			}
885 886
		}
886 887
		
887
		// load TXM-0.8.0 sample corpora (from the install directory)
888
		// load TXM-0.8.1 sample corpora (from the install directory)
888 889
		if (corporaDirs.contains(SAMPLES) && sampleCorporaDirectory.exists()) {
889 890
			
890 891
			Log.info(TXMUIMessages.installingSampleCorpus);
......
912 913
		}
913 914
		
914 915
		// TXM-0.8.0 previous installation corpora
915
		if (corporaDirs.contains(V080) && backupDir.listFiles(IOUtils.HIDDENFILE_FILTER).length > 0) { // not a new install, restore corpus from the corpora-previous directory
916
		if (corporaDirs.contains(V080) && previous080CorporaDirectory.exists()
917
				&& previous080CorporaDirectory.listFiles(IOUtils.HIDDENFILE_FILTER).length > 0) { // not a new install, restore corpus from the corpora-previous directory
916 918
			Log.info(NLS.bind(TXMUIMessages.installingPreviousCorpusFromP0, "0.8.0", corporaDir)); //$NON-NLS-1$
917
			JobHandler job = LoadBinaryCorporaDirectory.loadBinaryCorpusFromCorporaDirectory(backupDir, false, false, true);
919
			JobHandler job = LoadBinaryCorporaDirectory.loadBinaryCorpusFromCorporaDirectory(previous080CorporaDirectory, false, false, true);
918 920
			try {
919 921
				job.join();
920 922
			}
......
924 926
		}
925 927
		
926 928
		// TXM previous installation corpora
927
		if (corporaDirs.contains(V079) && previousCorporaDirectory.exists()) { // new installation (empty corpora directory)
928
			Log.info(NLS.bind(TXMUIMessages.installingPreviousCorpusFromP0, "0.7.9", previousCorporaDirectory)); //$NON-NLS-1$
929
			JobHandler job = LoadBinaryCorporaDirectory.loadBinaryCorpusFromCorporaDirectory(previousCorporaDirectory, false, false, true);
929
		if (corporaDirs.contains(V079) && previous079CorporaDirectory.exists()) { // new installation (empty corpora directory)
930
			Log.info(NLS.bind(TXMUIMessages.installingPreviousCorpusFromP0, "0.7.9", previous079CorporaDirectory)); //$NON-NLS-1$
931
			JobHandler job = LoadBinaryCorporaDirectory.loadBinaryCorpusFromCorporaDirectory(previous079CorporaDirectory, false, false, true);
930 932
			try {
931 933
				job.join();
932 934
			}

Also available in: Unified diff