Skip to content

Commit

Permalink
Further fixes #309
Browse files Browse the repository at this point in the history
  • Loading branch information
djcomlab committed Feb 2, 2017
1 parent c7806f3 commit 5768d65
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ The ISA Team and the ISA software suite have been funded by the EU Carcinogenomi
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Stack;

import org.apache.commons.lang.StringUtils;

/**
* @author Eamonn Maguire
Expand Down Expand Up @@ -364,8 +364,9 @@ public void run() {
}

if (fileToMapFSP.notEmpty()) {
if (fileToMapFSP.getSelectedFilePath().contains("&")) {
statusLab.setText("<html>filename of file to map must not contain special characters such as &, please select a different file or rename it...</html>");
String[] invalid_chars = new String[]{"&", ":", "?", "*", "|", ":"};
if (StringUtils.indexOfAny(fileToMapFSP.getSelectedFilePath(), invalid_chars) > -1) {
statusLab.setText("<html>filenames must not contain special characters such as " + StringUtils.substringBetween(Arrays.toString(invalid_chars), "[", "]") + ", please select a different file or rename it...</html>");
setCurrentPage(lastPage);
return;
} else{
Expand Down

0 comments on commit 5768d65

Please sign in to comment.