ENH: Only store previous time name if it is not at the current head

This commit is contained in:
Andrew Heather 2019-04-17 09:13:44 +01:00
parent 5f7b62c5e4
commit b2bc1d6546

View File

@ -655,7 +655,10 @@ bool Foam::Time::writeObject
// Does the writeTime trigger purging?
if (writeTime_ && purgeWrite_)
{
previousWriteTimes_.push(timeName());
if (previousWriteTimes_.top() != timeName())
{
previousWriteTimes_.push(timeName());
}
while (previousWriteTimes_.size() > purgeWrite_)
{