Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/management/FileSystemDumpInspector.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/management/FileSystemDumpInspector.java b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/management/FileSystemDumpInspector.java
index 944ec22..ce2d605 100644
--- a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/management/FileSystemDumpInspector.java
+++ b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/management/FileSystemDumpInspector.java
@@ -58,8 +58,16 @@ public class FileSystemDumpInspector implements DumpInspector {
@Override
public String[] getDumps() throws IOException {
File dumpDir = getDumpDirectory();
+ List<String> dumps = new ArrayList<String>();
if(dumpDir != null && dumpDir.exists() && dumpDir.isDirectory()){
- return FileSystemUtils.list(dumpDir, this.logger);
+ String[] list = FileSystemUtils.list(dumpDir, this.logger);
+ for (String dumpFolderName : list) {
+ File dumpFolder = new File(dumpDir, dumpFolderName);
+ if(dumpFolder.exists() && dumpFolder.isDirectory()){
+ dumps.add(dumpFolderName);
+ }
+ }
+ return dumps.toArray(new String[dumps.size()]);
} else {
return new String[0];
}

Back to the top