[Pkg-mozext-commits] [requestpolicy] 38/280: re-enable subscriptions (bug-bug.)

David Prévot taffit at moszumanska.debian.org
Sat May 2 20:29:57 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository requestpolicy.

commit c19f2d4615c3bed7d59ed941b0d500dcb7587d2e
Author: Martin Kimmerle <dev at 256k.de>
Date:   Wed Nov 26 04:34:48 2014 +0100

    re-enable subscriptions (bug-bug.)
---
 src/content/lib/ruleset-storage.jsm | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/content/lib/ruleset-storage.jsm b/src/content/lib/ruleset-storage.jsm
index 44bf597..54c598c 100644
--- a/src/content/lib/ruleset-storage.jsm
+++ b/src/content/lib/ruleset-storage.jsm
@@ -51,10 +51,16 @@ let RulesetStorage = {
       policyFile.appendRelativePath(subscriptionListName);
     }
     policyFile.appendRelativePath(filename);
-    let str;
-    if (policyFile.exists()) {
-      str = FileUtil.fileToString(policyFile);
-    }
+    // Important note: Do not catch the error thrown by the fileToString!
+    // There is no check for the existence of the file, because
+    // loadSubscriptionRules catches errors and then knows if a file
+    // existed or not. This is a bad implementation.
+    // TODO: solve this mess
+    let str = FileUtil.fileToString(policyFile);
+    //let str;
+    //if (policyFile.exists()) {
+    //  str = FileUtil.fileToString(policyFile);
+    //}
     return new RawRuleset(str);
   },
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git



More information about the Pkg-mozext-commits mailing list