skip empty files
This commit is contained in:
@@ -34,14 +34,19 @@ public class PdbFileIterator implements Iterator<Entry>, AutoCloseable {
|
||||
if (reader == null) {
|
||||
return null;
|
||||
}
|
||||
final Entry entry = reader.readNullableEntry();
|
||||
Entry entry = reader.readNullableEntry();
|
||||
|
||||
if (entry == null) {
|
||||
while (entry == null) {
|
||||
nextFile();
|
||||
if (reader == null) {
|
||||
return null;
|
||||
} else {
|
||||
return reader.readEntry().orElse(null);
|
||||
entry = reader.readEntry().orElse(null);
|
||||
// A reader might return null, for a newly opened reader,
|
||||
// if the file was created, but nothing has been written to
|
||||
// disk yet.
|
||||
// This might happen, because of buffering, or when an ingestion
|
||||
// was cancelled.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user