Add another preferences directory for applications: preferences/syspref
authorMike Hommey <glandium@debian.org>
Sat, 21 Jun 2008 01:09:21 +0000 (03:09 +0200)
committerMike Hommey <glandium@debian.org>
Tue, 18 Oct 2022 20:04:39 +0000 (21:04 +0100)
It was existing in previous versions of iceweasel as a symlink to
/etc/iceweasel/pref.

This has the side effect to make these preferences there work again, and
to disable the "set as default browser" dialog.

Gbp-Pq: Topic debian-hacks
Gbp-Pq: Name Add-another-preferences-directory-for-applications-p.patch

toolkit/xre/nsXREDirProvider.cpp

index 5536f4423f4af0eddeb4d5b57f703a420850be9e..2efab0cf7a4cd3ddae63b9ad62d0703465a441f0 100644 (file)
@@ -765,6 +765,7 @@ static const char* const kAppendPrefDir[] = {"defaults", "preferences",
 static const char* const kAppendBackgroundTasksPrefDir[] = {
     "defaults", "backgroundtasks", nullptr};
 #endif
+static const char *const kAppendSysPrefDir[] = { "defaults", "syspref", nullptr };
 
 nsresult nsXREDirProvider::GetFilesInternal(const char* aProperty,
                                             nsISimpleEnumerator** aResult) {
@@ -781,6 +782,7 @@ nsresult nsXREDirProvider::GetFilesInternal(const char* aProperty,
       LoadDirIntoArray(mXULAppDir, kAppendBackgroundTasksPrefDir, directories);
     }
 #endif
+    LoadDirIntoArray(mXULAppDir, kAppendSysPrefDir, directories);
 
     rv = NS_NewArrayEnumerator(aResult, directories, NS_GET_IID(nsIFile));
   } else if (!strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) {