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, 15 Dec 2020 20:57:15 +0000 (20:57 +0000)
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 62b5694e99e8a54bf91ce73779bd00861160d6a3..73b337d34a02aec202545ece30afa2344ae269ca 100644 (file)
@@ -834,6 +834,7 @@ static nsresult DeleteDirIfExists(nsIFile* dir) {
 
 static const char* const kAppendPrefDir[] = {"defaults", "preferences",
                                              nullptr};
+static const char *const kAppendSysPrefDir[] = { "defaults", "syspref", nullptr };
 
 nsresult nsXREDirProvider::GetFilesInternal(const char* aProperty,
                                             nsISimpleEnumerator** aResult) {
@@ -844,6 +845,7 @@ nsresult nsXREDirProvider::GetFilesInternal(const char* aProperty,
     nsCOMArray<nsIFile> directories;
 
     LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories);
+    LoadDirIntoArray(mXULAppDir, kAppendSysPrefDir, directories);
 
     rv = NS_NewArrayEnumerator(aResult, directories, NS_GET_IID(nsIFile));
   } else if (!strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) {