Bugfix: Ersetzen des "/" durch eine entsprechende Konstante.

Jetzt sollte es aber wirklich hinhauen. ._.
This commit is contained in:
Jan Philipp Timme 2014-11-02 01:21:05 +01:00
parent 8b7392ed64
commit d3bd491f1d
1 changed files with 2 additions and 6 deletions

View File

@ -42,17 +42,13 @@ public class CodeEnvironment {
*/
private static String[] getFileListFromFolder(File folder) {
ArrayList<String> fileList = new ArrayList<String>();
String rootPath = folder.getAbsolutePath() + "/";
String rootPath = folder.getAbsolutePath() + File.separator;
File[] folderContents = folder.listFiles();
for(File f : folderContents) {
if(f.isDirectory()) {
String[] filesInDirectory = CodeEnvironment.getFileListFromFolder(f);
for(String entry : filesInDirectory) {
if(entry.contains(rootPath)) {
fileList.add(entry.substring(rootPath.length()));
} else {
fileList.add(entry);
}
fileList.add(entry.replace(rootPath, ""));
}
} else {
fileList.add(f.toString());