Commit 985b87cb authored by Kathleen Brade's avatar Kathleen Brade
Browse files

Bug 19432: Remove special handling for Instantbird/Thunderbird

These applications now use the same directory structure as Tor Browser.
parent cf9b46f4
......@@ -32,8 +32,6 @@ TorProcessService.prototype =
kContractID : "@torproject.org/torlauncher-process-service;1",
kServiceName : "Tor Launcher Process Service",
kClassID: Components.ID("{FE7B4CAF-BCF4-4848-8BFF-EFA66C9AFDA1}"),
kThunderbirdID: "{3550f703-e582-4d05-9a08-453d09bdfdc6}",
kInstantbirdID: "{33cb9019-c295-46dd-be21-8c4936574bee}",
kTorLauncherExtPath: "tor-launcher@torproject.org", // This could vary.
kPrefPromptAtStartup: "extensions.torlauncher.prompt_at_startup",
......@@ -868,30 +866,19 @@ TorProcessService.prototype =
.getService(Ci.nsIProperties).get("CurProcD", Ci.nsIFile);
let appInfo = Cc["@mozilla.org/xre/app-info;1"]
.getService(Ci.nsIXULAppInfo);
if ((appInfo.ID == this.kThunderbirdID) ||
(appInfo.ID == this.kInstantbirdID))
{
// For TorBirdy and Tor Messenger the Tor Launcher extension
// directory is returned.
topDir.append("extensions");
topDir.append(this.kTorLauncherExtPath);
}
else // Tor Browser
{
// On Linux and Windows, we want to return the Browser/ directory.
// Because topDir ("CurProcD") points to Browser/browser on those
// platforms, we need to go up one level.
// On Mac OS, we want to return the TorBrowser.app/ directory.
// Because topDir points to Contents/Resources/browser on Mac OS,
// we need to go up 3 levels.
let tbbBrowserDepth = (TorLauncherUtil.isMac) ? 3 : 1;
while (tbbBrowserDepth > 0)
{
let didRemove = (topDir.leafName != ".");
topDir = topDir.parent;
if (didRemove)
tbbBrowserDepth--;
}
// On Linux and Windows, we want to return the Browser/ directory.
// Because topDir ("CurProcD") points to Browser/browser on those
// platforms, we need to go up one level.
// On Mac OS, we want to return the TorBrowser.app/ directory.
// Because topDir points to Contents/Resources/browser on Mac OS,
// we need to go up 3 levels.
let tbbBrowserDepth = (TorLauncherUtil.isMac) ? 3 : 1;
while (tbbBrowserDepth > 0)
{
let didRemove = (topDir.leafName != ".");
topDir = topDir.parent;
if (didRemove)
tbbBrowserDepth--;
}
this.mAppDir = topDir;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment