Skip to content

Commit

Permalink
Add fix
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Oct 4, 2023
1 parent 8def2b3 commit f872f3c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/ReadIterations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,20 @@ void SeriesIterator::initSeriesInLinearReadMode()
case PP::UpFront:
series.readGorVBased(
/* do_always_throw_errors = */ false, /* init = */ true);
series.advance(AdvanceMode::BEGINSTEP);
/*
* In linear read mode (where no parsing at all is done upon
* constructing the Series), it might turn out after parsing
* that what we expected to be a group-based Series was in fact
* a single file of a file-based Series.
* (E.g. when opening "data00000100.h5" directly instead of
* "data%T.h5")
* So we need to check the current value of
* `iterationEncoding()` once more.
*/
if (series.iterationEncoding() != IterationEncoding::fileBased)
{
series.advance(AdvanceMode::BEGINSTEP);
}
break;
}
data.parsePreference = *fOpen.out_parsePreference;
Expand Down

0 comments on commit f872f3c

Please sign in to comment.