Skip to content

Commit

Permalink
Revert "fixed: path substitution didn't work properly for special pat…
Browse files Browse the repository at this point in the history
…hs. The key in m_pathSubstitutions was translated but the compared strPath not."

This reverts commit 7a5f64c.
  • Loading branch information
WiSo committed Dec 8, 2012
1 parent 36861d7 commit d5d40aa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xbmc/utils/URIUtils.cpp
Expand Up @@ -368,11 +368,10 @@ bool URIUtils::GetParentPath(const CStdString& strPath, CStdString& strParent)


CStdString URIUtils::SubstitutePath(const CStdString& strPath) CStdString URIUtils::SubstitutePath(const CStdString& strPath)
{ {
CStdString strPathTrans = CSpecialProtocol::TranslatePath(strPath);
for (CAdvancedSettings::StringMapping::iterator i = g_advancedSettings.m_pathSubstitutions.begin(); for (CAdvancedSettings::StringMapping::iterator i = g_advancedSettings.m_pathSubstitutions.begin();
i != g_advancedSettings.m_pathSubstitutions.end(); i++) i != g_advancedSettings.m_pathSubstitutions.end(); i++)
{ {
if(CompareWithoutSlashAtEnd(strPathTrans, i->first)) if (strncmp(strPath.c_str(), i->first.c_str(), i->first.size()) == 0)
{ {
if (strPath.size() > i->first.size()) if (strPath.size() > i->first.size())
return URIUtils::AddFileToFolder(i->second, strPath.Mid(i->first.size())); return URIUtils::AddFileToFolder(i->second, strPath.Mid(i->first.size()));
Expand Down

0 comments on commit d5d40aa

Please sign in to comment.