Репозитории ALT
S: | 118.0-alt1 |
4.1: | 3.0.9-alt0.M41.1 |
+updates: | 3.0.4-alt0.M41.2 |
4.0: | 2.0.0.18-alt0.M40.1 |
3.0: | 1.0.7-alt3 |
+updates: | 1.0.8-alt0.M30.1 |
Группа :: Сети/WWW
Пакет: firefox
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: mozilla-alt-default-x11-path.patch
Скачать
Скачать
--- mozilla/modules/plugin/base/src/nsPluginsDirUnix.cpp.X11Dir 2006-11-16 17:37:54 +0300
+++ mozilla/modules/plugin/base/src/nsPluginsDirUnix.cpp 2006-11-16 17:53:15 +0300
@@ -92,31 +92,44 @@ static void DisplayPR_LoadLibraryErrorMe
char errorMsg[PLUGIN_MAX_LEN_OF_TMP_ARR] = "Cannot get error from NSPR.";
if (PR_GetErrorTextLength() < (int) sizeof(errorMsg))
PR_GetErrorText(errorMsg);
fprintf(stderr, "LoadPlugin: failed to initialize shared library %s [%s]\n",
libName, errorMsg);
}
+#define PREF_PLUGINS_DEFAULT_X11_PATH "plugin.default.x11.path"
static void SearchForSoname(const char* name, char** soname)
{
if (!(name && soname))
return;
- PRDir *fdDir = PR_OpenDir(DEFAULT_X11_PATH);
+
+ char *defaultX11PathPref = PREF_PLUGINS_DEFAULT_X11_PATH;
+ char *x11_path = NULL;
+ nsresult res;
+ nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &res));
+ if (NS_SUCCEEDED(res) && (prefs != nsnull))
+ res = prefs->GetCharPref(defaultX11PathPref, &x11_path);
+
+ if (!(x11_path))
+ return;
+
+ PRDir *fdDir = PR_OpenDir(x11_path);
if (!fdDir)
return;
int n = PL_strlen(name);
PRDirEntry *dirEntry;
while ((dirEntry = PR_ReadDir(fdDir, PR_SKIP_BOTH))) {
if (!PL_strncmp(dirEntry->name, name, n)) {
if (dirEntry->name[n] == '.' && dirEntry->name[n+1] && !dirEntry->name[n+2]) {
+ char out[PLUGIN_MAX_LEN_OF_TMP_ARR];
// name.N, wild guess this is what we need
- char out[PLUGIN_MAX_LEN_OF_TMP_ARR] = DEFAULT_X11_PATH;
+ snprintf(out, PLUGIN_MAX_LEN_OF_TMP_ARR, "%s", x11_path);
PL_strcat(out, dirEntry->name);
*soname = PL_strdup(out);
break;
}
}
}
PR_CloseDir(fdDir);