From 2f47eae3fff7fc1ec6b589cf7c186bc79eb42ada Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 26 May 2016 00:32:18 -0400 Subject: [PATCH] Allow string path to be passed to Zotero.File.getExtension() --- chrome/content/zotero/xpcom/file.js | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js index 629d5101e5..36bd2255d4 100644 --- a/chrome/content/zotero/xpcom/file.js +++ b/chrome/content/zotero/xpcom/file.js @@ -77,6 +77,7 @@ Zotero.File = new function(){ } function getExtension(file){ + file = this.pathToFile(file); var pos = file.leafName.lastIndexOf('.'); return pos==-1 ? '' : file.leafName.substr(pos+1); }