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
This commit is contained in:
Robin McCorkell 2014-04-21 09:35:15 +01:00 committed by Thomas Müller
parent c8801a41d8
commit c2f7848aeb
1 changed files with 2 additions and 1 deletions

View File

@ -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);