diff --git a/LCS/Common/include/Common/LofarLocators.h b/LCS/Common/include/Common/LofarLocators.h index 93587d3fe8ed1d96751f4e2ed2fce44880f0388a..7eee42e08c3706391b5010b0ce03d7c715e41d0d 100644 --- a/LCS/Common/include/Common/LofarLocators.h +++ b/LCS/Common/include/Common/LofarLocators.h @@ -45,11 +45,15 @@ 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); + addPathAtFront("$HOME/.lofar"); + } private: ConfigLocator(const ConfigLocator& that); diff --git a/LCS/Common/src/FileLocator.cc b/LCS/Common/src/FileLocator.cc index e057005e2c0b65a09b484af29d191c2c19857e5d..4009851df62bf7e71ba1aae9782b84df75c2a499 100644 --- a/LCS/Common/src/FileLocator.cc +++ b/LCS/Common/src/FileLocator.cc @@ -242,7 +242,7 @@ string FileLocator::locate (const string& aFile) else { // test subdir fullname += itsSubdir + "/" + aFile; } - std::cout << "Searching for : " << fullname << std::endl; + 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 bac6a33ad7becc24fecf39f7164330e758edcd94..2747767507afa562c5dfe94aee1a35bd2f39d7e6 100644 --- a/MAC/GCF/TM/src/GCF_Scheduler.cc +++ b/MAC/GCF/TM/src/GCF_Scheduler.cc @@ -112,11 +112,10 @@ void GCFScheduler::init(int argc, char** argv, const string& logfile) // Try to open the log_prop file, if process has its own log_prop file then use it // the INIT_LOGGER otherwise use the default mac.log_prop ConfigLocator aCL; - aCL.addPathAtFront("$HOME/.lofar"); // Make it search in the user directroy first - 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";