diff options
author | wsoltys <wiso@no.way> | 2012-12-06 19:37:15 +0100 |
---|---|---|
committer | wsoltys <wiso@no.way> | 2012-12-06 19:37:49 +0100 |
commit | 7a5f64c3266a0aa21429df70f122f6f05c0134b2 (patch) | |
tree | 54cab9a04e4216b6d9b207272d53fc909225e419 | |
parent | 8c2223920d093bd3aadeec3172830acc6f071a42 (diff) |
fixed: path substitution didn't work properly for special paths. The key in m_pathSubstitutions was translated but the compared strPath not.
-rw-r--r-- | xbmc/utils/URIUtils.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xbmc/utils/URIUtils.cpp b/xbmc/utils/URIUtils.cpp index bafa289209..58fdde718a 100644 --- a/xbmc/utils/URIUtils.cpp +++ b/xbmc/utils/URIUtils.cpp @@ -368,10 +368,11 @@ bool URIUtils::GetParentPath(const CStdString& strPath, CStdString& strParent) CStdString URIUtils::SubstitutePath(const CStdString& strPath) { + CStdString strPathTrans = CSpecialProtocol::TranslatePath(strPath); for (CAdvancedSettings::StringMapping::iterator i = g_advancedSettings.m_pathSubstitutions.begin(); i != g_advancedSettings.m_pathSubstitutions.end(); i++) { - if (strncmp(strPath.c_str(), i->first.c_str(), i->first.size()) == 0) + if(CompareWithoutSlashAtEnd(strPathTrans, i->first)) { if (strPath.size() > i->first.size()) return URIUtils::AddFileToFolder(i->second, strPath.Mid(i->first.size())); |