From 392d497d30c76a961697abb6f5f0e1cef02a53ad Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Wed, 15 Apr 2020 12:23:52 +0100 Subject: [PATCH] BUG: Time: check for processorsDDD. Fixes #1679. --- src/OpenFOAM/db/Time/Time.C | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 0b92e4b8ddc..502f4cadc90 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -197,7 +197,9 @@ void Foam::Time::setControls() // Check if time directory exists // 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 requiredPrecision = -1; @@ -221,7 +223,9 @@ void Foam::Time::setControls() oldTime = newTime; // 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) { -- GitLab