From c2f7848aeb194aa6bf7c3da330e2750648880c48 Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Mon, 21 Apr 2014 09:35:15 +0100 Subject: Adjust renaming of directories, fixes #8280 Directories will not be considered to have an extension, even if a dot is found. Stop Scrutinizer being annoyed But the spaced version looked good! Stop jsHint being annoyed These code quality tools are really pestering --- apps/files/js/filelist.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/files/js/filelist.js') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 9c749bb8f34..ab2601c5fb2 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -572,7 +572,8 @@ window.FileList = { input.focus(); //preselect input var len = input.val().lastIndexOf('.'); - if (len === -1) { + if ( len === -1 || + tr.data('type') === 'dir' ) { len = input.val().length; } input.selectRange(0, len); -- cgit v1.2.3