www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 7e67a344441cd16862d15b3dcd5a4b99806919aa
parent 5a1d605330a555ae586a875fd2a37be876975059
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date:   Sat, 21 Feb 2015 20:35:39 -0600

[WebPageDump] Fix regression from 5f8b56ef86a898caf1449eeefd198ba6e0247d4b

Diffstat:
Mchrome/content/zotero/webpagedump/common.js | 15++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/chrome/content/zotero/webpagedump/common.js b/chrome/content/zotero/webpagedump/common.js @@ -651,10 +651,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 @@ -662,17 +665,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;