Skip to content
Snippets Groups Projects
Commit 1397ec28 authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Merge pull request #13722 from mantidproject/force_instrument_download

Adding property for force updating instrument download directory
parents 6c7c9770 bd67da27
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,7 @@ const std::string DownloadInstrument::summary() const {
void DownloadInstrument::init() {
using Kernel::Direction;
declareProperty("ForceUpdate", false, "Ignore cache information");
declareProperty("FileDownloadCount", 0,
"The number of files downloaded by this algorithm",
Direction::Output);
......@@ -127,7 +128,8 @@ DownloadInstrument::StringToStringMap DownloadInstrument::processRepository() {
Poco::Path gitHubJson(localPath, "github.json");
Poco::File gitHubJsonFile(gitHubJson);
Poco::DateTime gitHubJsonDate(1900, 1, 1);
if (gitHubJsonFile.exists() && gitHubJsonFile.isFile()) {
bool forceUpdate = this->getProperty("ForceUpdate");
if ((!forceUpdate) && gitHubJsonFile.exists() && gitHubJsonFile.isFile()) {
gitHubJsonDate = gitHubJsonFile.getLastModified();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment