private String[] getPaths(String currentFile) { String[] paths; if(options.getPaths() != null) { paths = Arrays.copyOf(options.getPaths(), options.getPaths().length + 1); } else { paths = new String[1]; } String currentPath = currentFile.replaceAll("^(.*[\\/\\\\])[^\\/\\\\]*$", "$1"); paths[paths.length - 1] = currentPath; for(int i = 0; i < paths.length; i++) { paths[i] = paths[i].replace('\\', '/'); } return paths; }