Commit 392d497d authored by mattijs's avatar mattijs
Browse files

BUG: Time: check for processorsDDD. Fixes #1679.

parent a41584ff
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2015-2019 OpenCFD Ltd. Copyright (C) 2015-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -197,7 +197,9 @@ void Foam::Time::setControls() ...@@ -197,7 +197,9 @@ void Foam::Time::setControls()
// Check if time directory exists // Check if time directory exists
// If not increase time precision to see if it is formatted differently. // If not increase time precision to see if it is formatted differently.
if (!fileHandler().exists(timePath(), false)) // Note: do not use raw fileHandler().exists(...) since does not check
// alternative processorsDDD directories naming
if (fileHandler().filePath(timePath()).empty())
{ {
int oldPrecision = precision_; int oldPrecision = precision_;
int requiredPrecision = -1; int requiredPrecision = -1;
...@@ -221,7 +223,9 @@ void Foam::Time::setControls() ...@@ -221,7 +223,9 @@ void Foam::Time::setControls()
oldTime = newTime; oldTime = newTime;
// Check the existence of the time directory with the new format // Check the existence of the time directory with the new format
found = fileHandler().exists(timePath(), false); //found = fileHandler().exists(timePath(), false);
const fileName dirName(fileHandler().filePath(timePath()));
found = !dirName.empty();
if (found) if (found)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment