From 70b10ea320ce4c2501d1d33562d5b6b2bb470229 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 3 Nov 2007 18:42:06 +0000 Subject: [PATCH] Fix error saving snapshots of files not handled natively by Firefox (except PDFs) --- chrome/content/zotero/xpcom/attachments.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index 8a9de4cfa6..a6d44c4d49 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -265,7 +265,8 @@ Zotero.Attachments = new function(){ wbp.progressListener = new Zotero.WebProgressFinishListener(function(){ try { var str = Zotero.File.getSample(file); - if (Zotero.MIME.sniffForMIMEType(str) != 'application/pdf') { + if (mimeType == 'application/pdf' && + Zotero.MIME.sniffForMIMEType(str) != 'application/pdf') { Zotero.debug("Downloaded PDF did not have MIME type " + "'application/pdf' in Attachments.importFromURL()", 2); var item = Zotero.Items.get(itemID);