diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index a8831c3dbd..6c1f89d67f 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -260,8 +260,9 @@ var Zotero_File_Interface = new function() { function _importTranslatorsAvailable(translation, translators) { if(translators.length) { if(translation.location instanceof Components.interfaces.nsIFile) { - var collectionName = (translation.location.isDirectory() ? translation.location.leafName - : translation.location.leafName.substr(0, translation.location.leafName.lastIndexOf("."))); + var leafName = translation.location.leafName; + var collectionName = (translation.location.isDirectory() || leafName.indexOf(".") === -1 ? leafName + : leafName.substr(0, leafName.lastIndexOf("."))); var allCollections = Zotero.getCollections(); for(var i=0; i