Bugfix: Ersetzen des "/" durch eine entsprechende Konstante.
Jetzt sollte es aber wirklich hinhauen. ._.
This commit is contained in:
parent
8b7392ed64
commit
d3bd491f1d
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue