Commit 4902e07c by Chris Coughlin

Don't add input files if already in list

parent ec002db1
......@@ -1381,12 +1381,16 @@ public final class MyriadDesktop extends javax.swing.JFrame {
fc.setAcceptAllFileFilterUsed(true);
if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
for (File selectedFile: fc.getSelectedFiles()) {
String source = null;
if (selectedFile.isDirectory()) {
for (File f: selectedFile.listFiles()) {
ingestionSrcModel.addElement(f.getAbsolutePath());
source = f.getAbsolutePath();
}
} else {
ingestionSrcModel.addElement(selectedFile.getAbsolutePath());
source = selectedFile.getAbsolutePath();
}
if (source != null && !ingestionSrcModel.contains(source)) {
ingestionSrcModel.addElement(source);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment