From 62d08bdbbb987bba28ed62ab85e0c775529e0d3b Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 10 Apr 2012 20:01:11 -0400 Subject: [PATCH] Properly report upload errors and properly splice off HTML attachments --- chrome/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 index e6a3f0603a..f1a30476a8 100644 --- 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