Add another preferences directory for applications: preferences/syspref
authorMike Hommey <glandium@debian.org>
Sat, 21 Jun 2008 01:09:21 +0000 (03:09 +0200)
committerCarsten Schoenert <c.schoenert@t-online.de>
Fri, 14 Jun 2019 05:25:35 +0000 (06:25 +0100)
This can be used to symlink to /etc/ice*/pref.

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

toolkit/xre/nsXREDirProvider.cpp

index ff5d35b57d6044fd74484f227aecee695cdc1760..66ad49f17e1a1c6fc3d780b29e911067fb22dc78 100644 (file)
@@ -762,6 +762,8 @@ static nsresult DeleteDirIfExists(nsIFile* dir) {
 
 static const char* const kAppendPrefDir[] = {"defaults", "preferences",
                                              nullptr};
+static const char *const kAppendSysPrefDir[] = { "defaults", "syspref",
+                                                 nullptr };
 
 #ifdef DEBUG_bsmedberg
 static void DumpFileArray(const char* key, nsCOMArray<nsIFile> dirs) {
@@ -795,6 +797,7 @@ nsresult nsXREDirProvider::GetFilesInternal(const char* aProperty,
 
     LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories);
     LoadDirsIntoArray(mAppBundleDirectories, kAppendPrefDir, directories);
+    LoadDirIntoArray(mXULAppDir, kAppendSysPrefDir, directories);
 
     rv = NS_NewArrayEnumerator(aResult, directories);
   } else if (!strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) {