fx-compat: Fix _getExtensionFromURL()
This commit is contained in:
parent
300af4477f
commit
87decd0f8d
1 changed files with 2 additions and 3 deletions
|
@ -2842,9 +2842,8 @@ Zotero.Attachments = new function(){
|
||||||
|
|
||||||
|
|
||||||
this._getExtensionFromURL = function(url, contentType) {
|
this._getExtensionFromURL = function(url, contentType) {
|
||||||
var nsIURL = Components.classes["@mozilla.org/network/standard-url;1"]
|
var nsIURL = Services.io.newURI(url)
|
||||||
.createInstance(Components.interfaces.nsIURL);
|
.QueryInterface(Ci.nsIURL);
|
||||||
nsIURL.spec = url;
|
|
||||||
return Zotero.MIME.getPrimaryExtension(contentType, nsIURL.fileExtension);
|
return Zotero.MIME.getPrimaryExtension(contentType, nsIURL.fileExtension);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue