Skip to content

Commit

Permalink
re #4579 prevent repeated dir names on win
Browse files Browse the repository at this point in the history
  • Loading branch information
NickDraper committed Jan 20, 2012
1 parent a2be6bf commit 737bd13
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Code/Mantid/Framework/Kernel/src/ConfigService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,8 +650,13 @@ void ConfigServiceImpl::cacheUserSearchPaths()
*/
bool ConfigServiceImpl::isInDataSearchList(const std::string & path) const
{
// the path produced by poco will have \ on windows, but the searchdirs will always have /
std::string correctedPath=path;
replace( correctedPath.begin(), correctedPath.end(), '\\', '/' );


std::vector<std::string>::const_iterator it = std::find_if(m_DataSearchDirs.begin(),
m_DataSearchDirs.end(), std::bind2nd(std::equal_to<std::string>(), path));
m_DataSearchDirs.end(), std::bind2nd(std::equal_to<std::string>(), correctedPath));
return (it != m_DataSearchDirs.end());
}

Expand Down

0 comments on commit 737bd13

Please sign in to comment.