diff options
-rw-r--r-- | xbmc/utils/Addon.cpp | 21 | ||||
-rw-r--r-- | xbmc/utils/Addon.h | 7 |
2 files changed, 9 insertions, 19 deletions
diff --git a/xbmc/utils/Addon.cpp b/xbmc/utils/Addon.cpp index b228a2bb20..7198385bfd 100644 --- a/xbmc/utils/Addon.cpp +++ b/xbmc/utils/Addon.cpp @@ -226,8 +226,8 @@ CAddon::CAddon(const AddonProps &props) { if (props.libname.empty()) BuildLibName(); else m_strLibName = props.libname; - m_strProfile = GetProfilePath(); - m_userSettingsPath = GetUserSettingsPath(); + BuildProfilePath(); + m_userSettingsPath = m_profile + "settings.xml"; m_disabled = true; } @@ -237,8 +237,8 @@ CAddon::CAddon(const CAddon &rhs, const AddonPtr &parent) { m_props.uuid = StringUtils::CreateUUID(); m_userXmlDoc = rhs.m_userXmlDoc; - m_strProfile = GetProfilePath(); - m_userSettingsPath = GetUserSettingsPath(); + BuildProfilePath(); + m_userSettingsPath = m_profile + "settings.xml"; m_strLibName = rhs.LibName(); m_disabled = false; } @@ -501,18 +501,9 @@ TiXmlElement* CAddon::GetSettingsXML() return m_addonXmlDoc.RootElement(); } -CStdString CAddon::GetProfilePath() +void CAddon::BuildProfilePath() { - CStdString profile; - profile.Format("special://profile/addon_data/%s/", UUID().c_str()); - return profile; -} - -CStdString CAddon::GetUserSettingsPath() -{ - CStdString path; - CUtil::AddFileToFolder(Profile(), "settings.xml", path); - return path; + m_profile.Format("special://profile/addon_data/%s/", UUID().c_str()); } /** diff --git a/xbmc/utils/Addon.h b/xbmc/utils/Addon.h index b599f6dae2..ffe9bb0295 100644 --- a/xbmc/utils/Addon.h +++ b/xbmc/utils/Addon.h @@ -119,7 +119,7 @@ public: const CStdString Summary() const { return m_props.summary; } const CStdString Description() const { return m_props.description; } const CStdString Path() const { return m_props.path; } - const CStdString Profile() const { return m_strProfile; } + const CStdString Profile() const { return m_profile; } const CStdString LibName() const { return m_props.libname; } const CStdString Author() const { return m_props.author; } const CStdString Icon() const { return m_props.icon; } @@ -140,8 +140,7 @@ private: friend class AddonMgr; AddonProps m_props; const AddonPtr m_parent; - CStdString GetProfilePath(); - CStdString GetUserSettingsPath(); + void BuildProfilePath(); virtual bool IsAddonLibrary() { return false; } @@ -155,7 +154,7 @@ private: ADDONDEPS m_dependencies; void BuildLibName(); - CStdString m_strProfile; + CStdString m_profile; CStdString m_strLibName; bool m_disabled; CLocalizeStrings m_strings; |