[tbb-commits] [tor-browser/tor-browser-38.7.1esr-6.0-1] fixup! Bug 16940: After update, load local change notes.

gk at torproject.org gk at torproject.org
Sat Mar 19 20:21:55 UTC 2016


commit c1b7d7e2f51f89ab19018e99fe62f8654d3cecb8
Author: Kathy Brade <brade at pearlcrescent.com>
Date:   Mon Feb 29 14:47:01 2016 -0500

    fixup! Bug 16940: After update, load local change notes.
    
    When built with --enable-tor-browser-data-outside-app-dir, account
    for the new Mac OS directory structure (see bug #13252).
---
 browser/base/content/content.js | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/browser/base/content/content.js b/browser/base/content/content.js
index d1afdb9..a56d7ff 100644
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -597,15 +597,30 @@ let AboutTBUpdateListener = {
 
   // Read and return the text from the beginning of the changelog file that is
   // located at TorBrowser/Docs/ChangeLog.txt.
+  // On Mac OS, when building with --enable-tor-browser-data-outside-app-dir
+  // to support Gatekeeper signing, the file is located in
+  // TorBrowser.app/Contents/Resources/TorBrowser/Docs/.
+  //
   // When electrolysis is enabled we will need to adopt an architecture that is
   // more similar to the one that is used for about:home (see AboutHomeListener
   // in this file and browser/modules/AboutHome.jsm).
   getChangeLogText: function() {
     try {
+#ifdef TOR_BROWSER_DATA_OUTSIDE_APP_DIR
+      // "XREExeF".parent is the directory that contains firefox, i.e.,
+      // Browser/ or, on Mac OS, TorBrowser.app/Contents/MacOS/.
+      let f = Services.dirsvc.get("XREExeF", Ci.nsIFile).parent;
+#ifdef XP_MACOSX
+      f = f.parent;
+      f.append("Resources");
+#endif
+      f.append("TorBrowser");
+#else
       // "DefProfRt" is .../TorBrowser/Data/Browser
       let f = Cc["@mozilla.org/file/directory_service;1"]
                 .getService(Ci.nsIProperties).get("DefProfRt", Ci.nsIFile);
       f = f.parent.parent;  // Remove "Data/Browser"
+#endif
       f.append("Docs");
       f.append("ChangeLog.txt");
 



More information about the tbb-commits mailing list