From 3214e37d92787c1a6e19216faf037e7a4a99a4e6 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 8 May 2015 02:42:48 -0400 Subject: [PATCH] Ignore empty 'filename' property in Item.fromJSON() --- chrome/content/zotero/xpcom/data/item.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 964536e09..b6599c70c 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -4074,7 +4074,12 @@ Zotero.Item.prototype.fromJSON = Zotero.Promise.coroutine(function* (json) { break; case 'filename': - this.attachmentFilename = val; + if (val === "") { + Zotero.logError("Ignoring empty attachment filename in item JSON"); + } + else { + this.attachmentFilename = val; + } break; case 'path':