ENH: more stringent checks for fileName concatenation

- avoids some doubled slashes

STYLE: simplify concatenation of processor directory names
This commit is contained in:
Mark Olesen
2018-10-11 10:07:11 +02:00
parent a77ab5d4eb
commit c4542294a8
11 changed files with 38 additions and 31 deletions

View File

@ -88,7 +88,7 @@ int main(int argc, char *argv[])
const label nProcs = fileHandler().nProcs(args.path());
#else
label nProcs = 0;
while (isDir(args.path()/(word("processor") + name(nProcs))))
while (isDir(args.path()/("processor" + Foam::name(nProcs))))
{
++nProcs;
}
@ -106,7 +106,7 @@ int main(int argc, char *argv[])
(
Time::controlDictName,
args.rootPath(),
args.caseName()/fileName(word("processor") + name(proci))
args.caseName()/("processor" + Foam::name(proci))
)
);
}