From b694727029429b4bb1b2d811464dd2fe97b46fa2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 27 Mar 2007 21:22:48 +0000 Subject: [PATCH] Fixes #589, Add .pdf extension to downloaded PDFs for Windows compatibility Just never implemented something I should've --- chrome/content/zotero/xpcom/attachments.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index 13713ef36c..af8c38a041 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -786,11 +786,11 @@ Zotero.Attachments = new function(){ } - function _getExtensionFromURL(url) { + function _getExtensionFromURL(url, mimeType) { var nsIURL = Components.classes["@mozilla.org/network/standard-url;1"] .createInstance(Components.interfaces.nsIURL); nsIURL.spec = url; - return nsIURL.fileExtension; + return Zotero.MIME.getPrimaryExtension(mimeType, nsIURL.fileExtension); }