runtime-testsuite/Go: fix recursion

This commit is contained in:
Wolfgang Johannes Kohnen 2016-06-06 08:12:50 +02:00
parent ce4daca3a1
commit f8f872bfc9
1 changed files with 8 additions and 8 deletions

View File

@ -936,16 +936,16 @@ public abstract class BaseTest {
protected static void eraseDirectory(File dir) {
File[] files = dir.listFiles();
if (files == null) {
dir.delete();
}
for (File file : files) {
if (file.isDirectory()) {
eraseDirectory(file);
} else {
file.delete();
if (files != null) {
for (File file : files) {
if (file.isDirectory()) {
eraseDirectory(file);
} else {
file.delete();
}
}
}
dir.delete();
}
protected void eraseTempDir() {