Skip to content
Snippets Groups Projects
Commit 65ffce74 authored by Karl Palmen's avatar Karl Palmen
Browse files

Reverse instrument name search change re #3971


It appears that instrumentFile.find_first_of("_Def") searches for the first of any character in the argument string rather than the whole string as a substring. Search string changed back to "_".

Signed-off-by: default avatarKarl Palmen <karl.palmen@stfc.ac.uk>
parent 643a36a5
No related branches found
No related tags found
No related merge requests found
...@@ -134,7 +134,7 @@ namespace Mantid ...@@ -134,7 +134,7 @@ namespace Mantid
const std::string::size_type stripPath = m_filename.find_last_of("\\/"); const std::string::size_type stripPath = m_filename.find_last_of("\\/");
std::string instrumentFile = m_filename.substr(stripPath+1,m_filename.size()); std::string instrumentFile = m_filename.substr(stripPath+1,m_filename.size());
// Strip off "_Definition.xml" // Strip off "_Definition.xml"
m_instName = instrumentFile.substr(0,instrumentFile.find_first_of("_Def")); m_instName = instrumentFile.substr(0,instrumentFile.find_first_of("_"));
} }
// Load the XML text into a string // Load the XML text into a string
......
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