Ignore empty recording directories in LocalRecorder.getRecordings()
This commit is contained in:
parent
528d7336e1
commit
17901901f9
|
@ -448,9 +448,14 @@ public class LocalRecorder implements Recorder {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
|
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
|
||||||
if (rec.isDirectory()) {
|
if (rec.isDirectory()) {
|
||||||
try {
|
try {
|
||||||
|
// ignore directories, which are probably not created by ctbrec
|
||||||
if (rec.getName().length() != pattern.length()) {
|
if (rec.getName().length() != pattern.length()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// ignore empty directories
|
||||||
|
if (rec.listFiles().length == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Date startDate = sdf.parse(rec.getName());
|
Date startDate = sdf.parse(rec.getName());
|
||||||
Recording recording = new Recording();
|
Recording recording = new Recording();
|
||||||
|
|
Loading…
Reference in New Issue