Fixes #589, Add .pdf extension to downloaded PDFs for Windows compatibility
Just never implemented something I should've
This commit is contained in:
parent
a28ec9857f
commit
b694727029
|
@ -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"]
|
var nsIURL = Components.classes["@mozilla.org/network/standard-url;1"]
|
||||||
.createInstance(Components.interfaces.nsIURL);
|
.createInstance(Components.interfaces.nsIURL);
|
||||||
nsIURL.spec = url;
|
nsIURL.spec = url;
|
||||||
return nsIURL.fileExtension;
|
return Zotero.MIME.getPrimaryExtension(mimeType, nsIURL.fileExtension);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user