commit 2f47eae3fff7fc1ec6b589cf7c186bc79eb42ada
parent 47b934f67ead3102d7fc13b8f57aa5b4d06c0ee8
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 26 May 2016 00:32:18 -0400
Allow string path to be passed to Zotero.File.getExtension()
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git 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);
}