ENH: accept quoted surface names in surfaceFeatureExtract (#2071)

- allows use of surface names starting with a digit
  (by quoting the name).

  User is responsible for not generating bad names for output files.
  Eg "bad.**.name", since these will be difficult to handle from the
  shell
This commit is contained in:
Mark Olesen
2021-04-20 17:41:49 +02:00
parent 8524d02218
commit 7c494a6b64

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2015-2020 OpenCFD Ltd.
Copyright (C) 2015-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -246,11 +246,14 @@ int main(int argc, char *argv[])
for (const entry& dEntry : dict)
{
if (!dEntry.isDict() || dEntry.keyword().isPattern()) // safety
if (!dEntry.isDict()) // dictionary entries only
{
continue;
}
// Note - do not check for shell meta-characters
// - user responsibility
const word& dictName = dEntry.keyword();
const dictionary& surfaceDict = dEntry.dict();