Skip to content

Commit

Permalink
Bug fix: Don't forget closing files
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Aug 9, 2021
1 parent 9ff726a commit 0d9a9a4
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/Series.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,13 +551,17 @@ SeriesInterface::flushFileBased( iterations_iterator begin, iterations_iterator
{
using IO = IterationOpened;
case IO::RemainsClosed:
continue;
// we might need to proceed further if the close status is
// ClosedInFrontend
// hence no continue here
// otherwise, we might forget to close files physically
break;
case IO::HasBeenOpened:
// continue below
it->second.flush();
break;
}

it->second.flush();

if( *it->second.m_closed ==
Iteration::CloseStatus::ClosedInFrontend )
Expand Down Expand Up @@ -629,13 +633,16 @@ SeriesInterface::flushGorVBased( iterations_iterator begin, iterations_iterator
{
using IO = IterationOpened;
case IO::RemainsClosed:
continue;
// we might need to proceed further if the close status is
// ClosedInFrontend
// hence no continue here
break;
case IO::HasBeenOpened:
// continue below
it->second.flush();
break;
}

it->second.flush();
if( *it->second.m_closed ==
Iteration::CloseStatus::ClosedInFrontend )
{
Expand Down

0 comments on commit 0d9a9a4

Please sign in to comment.