Skip to content

Commit

Permalink
Improved check for global plugins vs local plugins to use full pathnames
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Jun 10, 2011
1 parent bf9c23b commit c881cff
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions doc.cpp
Expand Up @@ -827,6 +827,7 @@ void CMUSHclientDoc::SetUpOutputWindow (void)
for (vector<string>::const_iterator i = v.begin (); i != v.end (); i++)
{
strPath = i->c_str ();
string sGlobalPluginPath (Make_Absolute_Path (strPath));
bool bAlreadyLoaded = false;

// see if we already have this one
Expand All @@ -835,8 +836,10 @@ void CMUSHclientDoc::SetUpOutputWindow (void)
++pit)
{
CPlugin * p = *pit;
// convert filename to absolute path for a better comparison
string sThisPluginPath (Make_Absolute_Path (p->m_strSource));

if (p->m_strSource == strPath)
if (sGlobalPluginPath == sThisPluginPath)
{
bAlreadyLoaded = true;
p->m_bGlobal = true;
Expand All @@ -853,8 +856,10 @@ void CMUSHclientDoc::SetUpOutputWindow (void)
++pit)
{
CPlugin * p = *pit;
// convert filename to absolute path for a better comparison
string sThisPluginPath (Make_Absolute_Path (p->m_strSource));

if (p->m_strSource == strPath)
if (sGlobalPluginPath == sThisPluginPath)
{
p->m_bGlobal = true;
break;
Expand Down

0 comments on commit c881cff

Please sign in to comment.