commit 7d70cc58868c701f05385f742819efd8e83a6119
parent 66eb40da32e6e4f8aa3d682e215a1069aa484b1a
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date: Sat, 21 Feb 2015 20:35:39 -0600
[WebPageDump] Fix regression from 5f8b56ef86a898caf1449eeefd198ba6e0247d4b
Diffstat:
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/chrome/content/zotero/webpagedump/common.js b/chrome/content/zotero/webpagedump/common.js
@@ -654,10 +654,13 @@ var wpdCommon = {
if (MODE_SIMULATE) return true;
try {
//new obj_URI object
- var obj_URI = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService).newURI(aSourceURL, null, null);
+ var obj_URI = Components.classes["@mozilla.org/network/io-service;1"]
+ .getService(Components.interfaces.nsIIOService)
+ .newURI(aSourceURL, null, null);
//new file object
- var obj_TargetFile = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+ var obj_TargetFile = Components.classes["@mozilla.org/file/local;1"]
+ .createInstance(Components.interfaces.nsILocalFile);
//set file with path
// NOTE: This function has a known bug on the macintosh and other OSes
// which do not represent file locations as paths. If you do use this
@@ -665,17 +668,19 @@ var wpdCommon = {
obj_TargetFile.initWithPath(aTargetFilename);
//new persistence object
- var obj_Persist = Components.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"].createInstance(Components.interfaces.nsIWebBrowserPersist);
+ var obj_Persist = Components.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]
+ .createInstance(Components.interfaces.nsIWebBrowserPersist);
// set flags
const nsIWBP = Components.interfaces.nsIWebBrowserPersist;
- var flags = nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES | nsIWBP.PERSIST_FLAGS_FROM_CACHE;
+ var flags = nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES
+ | nsIWBP.PERSIST_FLAGS_FROM_CACHE;
//nsIWBP.PERSIST_FLAGS_BYPASS_CACHE;
obj_Persist.persistFlags = flags;
// has the url the same filetype like the file extension?
//save file to target
- Zotero.Utilities.Internal.saveURI(wbp, obj_URI, obj_TargetFile);
+ Zotero.Utilities.Internal.saveURI(obj_Persist, obj_URI, obj_TargetFile);
return true;