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, 5 Oct 2021 21:18:02 +0000 (22:18 +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 7641ef683c39b94eb637121fd943deb49dc5584d..114ac97ee0055c3de5f81347a7fc36319ecf2c8a 100644 (file)
@@ -839,6 +839,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) {
@@ -849,6 +850,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)) {