POSIX/debug: Add ./system on the list of etc directories

in particular to pick-up the DebugSwitches from system/controlDict at
global construction time.

Disadvantage is that system/controlDict is only picked-up if the
OpenFOAM application is executed IN the case directory.  The directory
provided by the -case option is not yet known as the arguments have not
yet been parsed.
This commit is contained in:
Henry
2015-02-01 12:34:19 +00:00
parent 88a021bd4f
commit d77218b427
2 changed files with 14 additions and 5 deletions

View File

@ -277,11 +277,23 @@ Foam::fileNameList Foam::findEtcFiles
{
fileNameList results;
// Search for user files in ./system
// Assumes the application is executed in the case directory
fileName searchDir = "system";
if (isDir(searchDir))
{
fileName fullName = searchDir/name;
if (isFile(fullName))
{
results.append(fullName);
}
}
// Search for user files in
// * ~/.OpenFOAM/VERSION
// * ~/.OpenFOAM
//
fileName searchDir = home()/".OpenFOAM";
searchDir = home()/".OpenFOAM";
if (isDir(searchDir))
{
fileName fullName = searchDir/FOAMversion/name;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -364,7 +364,4 @@ Foam::simpleObjectRegistry& Foam::debug::dimensionedConstantObjects()
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //