fx-compat: Fix Zotero.File.download()

This commit is contained in:
Abe Jellinek 2022-05-24 00:47:22 -06:00
parent eae9a4447d
commit 7adb8fd150

View file

@ -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);