diff --git a/Framework/Kernel/src/ConfigService.cpp b/Framework/Kernel/src/ConfigService.cpp index fa4d4e9779e222284ea25bc574bf8dd9e4f0ad5a..99a5a3220a6c45b15f29e6a37870a205e717b828 100644 --- a/Framework/Kernel/src/ConfigService.cpp +++ b/Framework/Kernel/src/ConfigService.cpp @@ -1637,11 +1637,18 @@ const std::string ConfigServiceImpl::getVTPFileDirectory() { */ void ConfigServiceImpl::cacheInstrumentPaths() { m_InstrumentDirs.clear(); - Poco::Path path(getAppDataDir()); - path.makeDirectory(); - path.pushDirectory("instrument"); - std::string appdatadir = path.toString(); - addDirectoryifExists(appdatadir, m_InstrumentDirs); + + // only use downloaded instruments if configured to download + const std::string updateInstrStr = + this->getString("UpdateInstrumentDefinitions.OnStartup"); + if (updateInstrStr.compare("1") == 0 || updateInstrStr.compare("on") == 0 || + updateInstrStr.compare("On") == 0) { + Poco::Path path(getAppDataDir()); + path.makeDirectory(); + path.pushDirectory("instrument"); + std::string appdatadir = path.toString(); + addDirectoryifExists(appdatadir, m_InstrumentDirs); + } #ifndef _WIN32 std::string etcdatadir = "/etc/mantid/instrument";