Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-release-src > by-pkgid > ae59112a30001eabd903cc2e23296630 > files > 1

xbmc-9.11-1.svn29467.pvr_testing2.1mdv2010.1.src.rpm

diff -N'urpax*~' -x'*.orig' -x'*.rej' xbmc-pvr-testing2-29467/xbmc/addons/AddonDll.h xbmc-pvr-testing2-29467-addons-fhs/xbmc/addons/AddonDll.h
--- xbmc-pvr-testing2-29467/xbmc/addons/AddonDll.h	2010-04-24 05:06:25.000000000 +0300
+++ xbmc-pvr-testing2-29467-addons-fhs/xbmc/addons/AddonDll.h	2010-04-25 18:11:30.224889487 +0300
@@ -105,9 +105,14 @@ template<class TheDll, typename TheStruc
 bool CAddonDll<TheDll, TheStruct, TheProps>::LoadDll()
 {
   CStdString strFileName;
+  CStdString strPath = Path();
+  strPath.Replace("special://xbmc", @XBMCLIBS@);
+  if (!CFile::Exists(strPath + LibName()))
+    strPath = Path();
+
   if (!Parent())
   {
-    strFileName = Path() + LibName();
+    strFileName = strPath + LibName();
   }
   else
   { //FIXME hack to load same Dll twice
@@ -117,7 +122,7 @@ bool CAddonDll<TheDll, TheStruct, ThePro
     strFileName += "-" + ID() + extension;
 
     if (!CFile::Exists(strFileName))
-      CFile::Cache(Path() + LibName(), strFileName);
+      CFile::Cache(strPath + LibName(), strFileName);
 
     CLog::Log(LOGNOTICE, "ADDON: Loaded virtual child addon %s", strFileName.c_str());
   }
diff -N'urpax*~' -x'*.orig' -x'*.rej' xbmc-pvr-testing2-29467/xbmc/addons/AddonManager.cpp xbmc-pvr-testing2-29467-addons-fhs/xbmc/addons/AddonManager.cpp
--- xbmc-pvr-testing2-29467/xbmc/addons/AddonManager.cpp	2010-04-24 05:06:25.000000000 +0300
+++ xbmc-pvr-testing2-29467-addons-fhs/xbmc/addons/AddonManager.cpp	2010-04-25 19:46:10.339963021 +0300
@@ -305,7 +305,8 @@ void CAddonMgr::LoadAddons(const CStdStr
 
     // refuse to store addons with missing library
     CStdString library(CUtil::AddFileToFolder(addon->Path(), addon->LibName()));
-    if (!CFile::Exists(library))
+    if (!CFile::Exists(library) && (library.substr(0, 14) != "special://xbmc" ||
+                                    !CFile::Exists(@XBMCLIBS@ + library.substr(14))))
     {
       CLog::Log(LOGDEBUG, "ADDON: Missing library file %s, bypassing package", library.c_str());
       continue;