From 7adb8fd150d2a9eb6e36119478b16925a5978e0f Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 24 May 2022 00:47:22 -0600 Subject: [PATCH] fx-compat: Fix Zotero.File.download() --- chrome/content/zotero/xpcom/file.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js index f6bb2978e9..6750c666e0 100644 --- a/chrome/content/zotero/xpcom/file.js +++ b/chrome/content/zotero/xpcom/file.js @@ -459,8 +459,11 @@ Zotero.File = new function(){ } var deferred = Zotero.Promise.defer(); - const uri_ = NetUtil.ioService.newURI(uri); - const inputChannel = NetUtil.ioService.newChannelFromURI(uri_); + const uri_ = NetUtil.newURI(uri); + const inputChannel = NetUtil.newChannel({ + uri: uri_, + loadUsingSystemPrincipal: true + }); const outputChannel = FileUtils.openSafeFileOutputStream(new FileUtils.File(path)); const pipe = Cc["@mozilla.org/pipe;1"].createInstance(Ci.nsIPipe); pipe.init(true, true, 0, 0xffffffff, null);