www

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

commit 62d08bdbbb987bba28ed62ab85e0c775529e0d3b
parent 3f165a4dc39b273523b9350d0e3fb35134ea039b
Author: Simon Kornblith <simon@simonster.com>
Date:   Tue, 10 Apr 2012 20:01:11 -0400

Properly report upload errors and properly splice off HTML attachments

Diffstat:
Mchrome/content/zotero/xpcom/connector/translate_item.js | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/connector/translate_item.js b/chrome/content/zotero/xpcom/connector/translate_item.js @@ -42,8 +42,9 @@ Zotero.Translate.ItemSaver = function(libraryID, attachmentMode, forceTagType, d if(callback) { if(status === false || status === 100) { delete Zotero.Translate.ItemSaver._attachmentCallbacks[id]; + } else { + data[1] = 50+data[1]/2; } - data[1] = 50+data[1]/2; callback(data[1], data[2]); } }); @@ -113,7 +114,7 @@ Zotero.Translate.ItemSaver.prototype = { // Get rid of attachments that we won't be able to save properly and add ids for(var j=0; j<item.attachments.length; j++) { if(!item.attachments[j].url || item.attachments[j].mimeType === "text/html") { - item.attachments.splice(j, 1); + item.attachments.splice(j--, 1); } else { item.attachments[j].id = Zotero.Utilities.randomString(); }