diff --git a/Code/Mantid/Framework/Kernel/inc/MantidKernel/ConfigService.h b/Code/Mantid/Framework/Kernel/inc/MantidKernel/ConfigService.h index 0fb86714ff218acf9acc21def2c5e4a7c50b9bc4..cce37d206441deb5e33c39ff6662bf144e543cb3 100644 --- a/Code/Mantid/Framework/Kernel/inc/MantidKernel/ConfigService.h +++ b/Code/Mantid/Framework/Kernel/inc/MantidKernel/ConfigService.h @@ -123,6 +123,8 @@ namespace Mantid // Searches for a configuration property and returns its value template<typename T> int getValue(const std::string& keyName, T& out); + /// Return the local properties filename. + std::string getLocalFilename() const; /// Return the user properties filename std::string getUserFilename() const; diff --git a/Code/Mantid/Framework/Kernel/src/ConfigService.cpp b/Code/Mantid/Framework/Kernel/src/ConfigService.cpp index fd506445a5afcae15595b5695931c2321369d418..133f7e9393a7b37d7c8490f16b1709a53300d1bd 100644 --- a/Code/Mantid/Framework/Kernel/src/ConfigService.cpp +++ b/Code/Mantid/Framework/Kernel/src/ConfigService.cpp @@ -179,6 +179,8 @@ ConfigServiceImpl::ConfigServiceImpl() : updateConfig(getPropertiesDir() + m_properties_file_name, false, false); propertiesFilesList = getPropertiesDir() + m_properties_file_name; + updateConfig(getLocalFilename(), true, false); + if (Poco::Environment::has("MANTIDPROPERTIES")) { //and then append the user properties @@ -866,9 +868,22 @@ int ConfigServiceImpl::getValue(const std::string& keyName, T& out) return result; } +/** + * Return the full filename of the local properties file. + * @returns A string containing the full path to the local file. + */ +std::string ConfigServiceImpl::getLocalFilename() const +{ +#ifdef _WIN32 + return ""; +#else + return "/etc/mantid.local.properties"; +#endif +} + /** * Return the full filename of the user properties file - * @returns A string containg the full path to the user file + * @returns A string containing the full path to the user file */ std::string ConfigServiceImpl::getUserFilename() const {