From 9bb48cc37a5efd78e34768bfec47613f488b1cd7 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 30 Aug 2019 12:50:45 +0200 Subject: [PATCH] ENH: also accept reading fileName as wordToken - should have been part of commit 9d36d3c08a404e2c which allows us to upcast a word to a fileName. --- src/OpenFOAM/primitives/strings/fileName/fileNameIO.C | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/primitives/strings/fileName/fileNameIO.C b/src/OpenFOAM/primitives/strings/fileName/fileNameIO.C index c26e2c71f5..a8057c3751 100644 --- a/src/OpenFOAM/primitives/strings/fileName/fileNameIO.C +++ b/src/OpenFOAM/primitives/strings/fileName/fileNameIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -51,8 +51,9 @@ Foam::Istream& Foam::operator>>(Istream& is, fileName& val) return is; } - if (t.isString()) + if (t.isStringType()) { + // Also accept a plain word as a fileName val = t.stringToken(); } else