[Pkg-mozext-commits] [requestpolicy] 203/280: add comment regarding #597
David Prévot
taffit at moszumanska.debian.org
Sat May 2 20:30:27 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 8d97f7f6b25fba30b3afaf05828d2fcafa7110b2
Author: Martin Kimmerle <dev at 256k.de>
Date: Mon Feb 2 18:25:10 2015 +0100
add comment regarding #597
No longer catch exceptions in `fileToString`. Otherwise the
subscriptions aren't fetched at all, for whatever reason.
The subscription system needs to be rewritten anyway.
---
src/content/lib/utils/files.jsm | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/content/lib/utils/files.jsm b/src/content/lib/utils/files.jsm
index c9b5934..f8ca07c 100644
--- a/src/content/lib/utils/files.jsm
+++ b/src/content/lib/utils/files.jsm
@@ -76,10 +76,21 @@ var FileUtil = {
* @param {nsIFile} file
*/
fileToString : function(file) {
- if (file.exists() === false) {
- // prevent NS_ERROR_FILE_NOT_FOUND
- return "";
- }
+ // FIXME: This function MUST NOT check for the file to exist,
+ // otherwise the subscriptions are not fetched at all,
+ // for whatever reason.
+ //
+ // Another issue, maybe it's the same as above, is that
+ // `loadSubscriptionRules()` catches exceptions and by
+ // that knows if the file exists or not. See also
+ // `loadRawRulesetFromFile()`.
+ //
+ // The subscription system urgently needs to rewritten,
+ // see issue #597.
+ //if (file.exists() === false) {
+ // // prevent NS_ERROR_FILE_NOT_FOUND
+ // return "";
+ //}
var stream = Cc["@mozilla.org/network/file-input-stream;1"]
.createInstance(Ci.nsIFileInputStream);
stream.init(file, 0x01, octal444, 0);
--
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