www

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

commit 70b10ea320ce4c2501d1d33562d5b6b2bb470229
parent ba4caa7c861e9645c0955ccbb04ebeedc436cefd
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat,  3 Nov 2007 18:42:06 +0000

Fix error saving snapshots of files not handled natively by Firefox (except PDFs)



Diffstat:
Mchrome/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 @@ -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);