commit 2a986c8635f3f368ba493b5b9c041cc572ccc0b1 parent 5a8de7054cec894000f377b40698f9d09cd7629a Author: Dan Stillman <dstillman@zotero.org> Date: Thu, 18 Sep 2014 17:23:57 -0400 Don't match extension in createShortened() for dot-files (.hidden) Diffstat:
| M | chrome/content/zotero/xpcom/file.js | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js @@ -347,8 +347,8 @@ Zotero.File = new function(){ } // Preserve extension - var matches = file.leafName.match(/\.[a-z0-9]{0,20}$/i); - var ext = matches ? matches[0] : ""; + var matches = file.leafName.match(/.+(\.[a-z0-9]{0,20})$/i); + var ext = matches ? matches[1] : ""; if (pathError) { let pathLength = pathByteLength - fileNameByteLength;