diff --git a/LCS/Common/include/Common/LofarLocators.h b/LCS/Common/include/Common/LofarLocators.h index 93587d3fe8ed1d96751f4e2ed2fce44880f0388a..2e404c24a2f664478de68409fc052aeeb2a58e7b 100644 --- a/LCS/Common/include/Common/LofarLocators.h +++ b/LCS/Common/include/Common/LofarLocators.h @@ -45,11 +45,14 @@ public: #define CONFIG_SUB_DIR "etc" // Create a ConfigLocator with a default search path. - ConfigLocator() : FileLocator() - { setSubdir(CONFIG_SUB_DIR); } + ConfigLocator() : FileLocator() { + setSubdir(CONFIG_SUB_DIR); + addPathAtFront("$HOME/.lofar"); + } // Create a ConfigLocator with a predefined search path. - explicit ConfigLocator (const string& aPath) : FileLocator(aPath) - { setSubdir(CONFIG_SUB_DIR); } + explicit ConfigLocator (const string& aPath) : FileLocator(aPath) { + setSubdir(CONFIG_SUB_DIR); + } private: ConfigLocator(const ConfigLocator& that); diff --git a/LCS/Common/src/FileLocator.cc b/LCS/Common/src/FileLocator.cc index 304a873e9d5d6ba7c90422fa126c09c65cd21cab..4009851df62bf7e71ba1aae9782b84df75c2a499 100644 --- a/LCS/Common/src/FileLocator.cc +++ b/LCS/Common/src/FileLocator.cc @@ -242,6 +242,7 @@ string FileLocator::locate (const string& aFile) else { // test subdir fullname += itsSubdir + "/" + aFile; } + result = stat(fullname.c_str(), &fileStat); if (result == 0) { // found? return (fullname); diff --git a/MAC/GCF/TM/src/GCF_Scheduler.cc b/MAC/GCF/TM/src/GCF_Scheduler.cc index f63e3676261c847d8ef62d612891038e69ad070f..2747767507afa562c5dfe94aee1a35bd2f39d7e6 100644 --- a/MAC/GCF/TM/src/GCF_Scheduler.cc +++ b/MAC/GCF/TM/src/GCF_Scheduler.cc @@ -114,7 +114,8 @@ void GCFScheduler::init(int argc, char** argv, const string& logfile) ConfigLocator aCL; string procName(basename(argv[0])); string logPropFile(procName + ".log_prop"); - // First try logpropfile <task>.log_prop + + // First try logpropfile <task>.log_prop if (aCL.locate(logPropFile) == "") { // locator could not find it try defaultname logPropFile = "mac.log_prop";