Aded empty selected directory fix

This commit is contained in:
Luka 2019-01-29 14:20:26 +01:00
parent acf2fb086b
commit 588ce7e15c

View File

@ -332,7 +332,11 @@ public class CorpusTab {
* has to produce a non-empty list results list
*/
private void chooseCorpusLocation() {
File oldSelectedDirectory = selectedDirectory != null ? new File(selectedDirectory.getAbsolutePath()) : null;
selectedDirectory = directoryChooser();
if(selectedDirectory == null) {
selectedDirectory = oldSelectedDirectory;
}
if (selectedDirectory != null && ValidationUtil.isReadableDirectory(selectedDirectory)) {
logger.info("selected corpus dir: ", selectedDirectory.getAbsolutePath());