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>
Wed, 16 Mar 2022 05:55:46 +0000 (05:55 +0000)
This can be used to symlink to /etc/thunderbird/pref.

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

toolkit/xre/nsXREDirProvider.cpp

index d6def8aee83d6e5bdbcda917799aa82560bbef6f..a4024d26bf72b7c0ac19cbd6cac5b1c80294e259 100644 (file)
@@ -811,6 +811,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) {
@@ -827,6 +828,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)) {