[tbb-commits] [tor-launcher/master] Bug #11641: change TBB directory structure to be more like Firefox's.
mikeperry at torproject.org
mikeperry at torproject.org
Thu May 29 19:52:53 UTC 2014
commit 98fc1549183077ef6076af93fddbce1991271b21
Author: Kathy Brade <brade at pearlcrescent.com>
Date: Tue Apr 29 13:36:53 2014 -0400
Bug #11641: change TBB directory structure to be more like Firefox's.
Account for new directory structure in getTorFile().
On Windows, prepend the directory that contains tor.exe to PATH.
---
src/components/tl-process.js | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/components/tl-process.js b/src/components/tl-process.js
index 4316a76..fb795dd 100644
--- a/src/components/tl-process.js
+++ b/src/components/tl-process.js
@@ -367,6 +367,19 @@ TorProcessService.prototype =
args.push("1");
}
+ // On Windows, prepend the Tor program directory to PATH. This is
+ // needed so that pluggable transports can find OpenSSL DLLs, etc.
+ // See https://trac.torproject.org/projects/tor/ticket/10845
+ if (TorLauncherUtil.isWindows)
+ {
+ var env = Cc["@mozilla.org/process/environment;1"]
+ .getService(Ci.nsIEnvironment);
+ var path = exeFile.parent.path;
+ if (env.exists("PATH"))
+ path += ";" + env.get("PATH");
+ env.set("PATH", path);
+ }
+
this.mTorProcessStatus = this.kStatusStarting;
var p = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
@@ -646,7 +659,7 @@ TorProcessService.prototype =
else
{
// For Firefox, paths are relative to the top of the TBB install.
- var tbbBrowserDepth = 1; // Windows and Linux
+ var tbbBrowserDepth = 0; // Windows and Linux
if (TorLauncherUtil.isAppVersionAtLeast("21.0"))
{
// In FF21+, CurProcD is the "browser" directory that is next to
@@ -654,7 +667,7 @@ TorProcessService.prototype =
++tbbBrowserDepth;
}
if (TorLauncherUtil.isMac)
- tbbBrowserDepth += 4;
+ tbbBrowserDepth += 2;
topDir = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties).get("CurProcD", Ci.nsIFile);
@@ -667,6 +680,7 @@ TorProcessService.prototype =
}
}
+ topDir.append("TorBrowser");
this.mTorFileBaseDir = topDir;
}
More information about the tbb-commits
mailing list