[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [https-everywhere/master] Revert "Apply dm0's patch to support global installation"
Author: Peter Eckersley <pde@xxxxxxx>
Date: Fri, 12 Nov 2010 11:16:06 -0800
Subject: Revert "Apply dm0's patch to support global installation"
Commit: 89fb2bea9f3726ad90895d5a94aa87fed7f3130c
This reverts commit 4f6bb4123fbaefa9e30f09a146125e0099215c44.
This patch needs a case that uses AddonManager so that it doesn't crash in
Firefox 4.
https://trac.torproject.org/projects/tor/ticket/2096
---
src/chrome/content/code/HTTPSRules.js | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/chrome/content/code/HTTPSRules.js b/src/chrome/content/code/HTTPSRules.js
index 6a31a37..e888f55 100644
--- a/src/chrome/content/code/HTTPSRules.js
+++ b/src/chrome/content/code/HTTPSRules.js
@@ -140,12 +140,21 @@ const RuleWriter = {
},
getRuleDir: function() {
- var file = CC["@mozilla.org/extensions/manager;1"].
- getService(Components.interfaces.nsIExtensionManager).
- getInstallLocation("https-everywhere@xxxxxxx").
- getItemFile("https-everywhere@xxxxxxx", "chrome").clone();
+ var loc = "ProfD"; // profile directory
+ var file =
+ CC["@mozilla.org/file/directory_service;1"]
+ .getService(CI.nsIProperties)
+ .get(loc, CI.nsILocalFile)
+ .clone();
+ file.append("extensions");
+ file.append("https-everywhere@xxxxxxx");
+ file.append("chrome");
file.append("content");
file.append("rules");
+ // Check for existence, if not, create.
+ if (!file.exists()) {
+ file.create(CI.nsIFile.DIRECTORY_TYPE, 0700);
+ }
if (!file.isDirectory()) {
// XXX: Arg, death!
}
--
1.7.1