TOOLS/lua/autoload.lua: actually sort files case insensitive

Regression since 8996f79edb.
Closes #4398
This commit is contained in:
Ricardo Constantino 2017-05-04 14:23:39 +01:00
parent 1cab4b6075
commit 95d5fe1626
No known key found for this signature in database
GPG Key ID: EFD16019AE4FF531
1 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,8 @@ function find_and_add_entries()
local len = string.len(a) - string.len(b)
if len ~= 0 then -- case for ordering filename ending with such as X.Y.Z
local ext = string.len(get_extension(a)) + 1
return string.sub(a, 1, -ext) < string.sub(b, 1, -ext)
a = string.sub(a, 1, -ext)
b = string.sub(b, 1, -ext)
end
return string.lower(a) < string.lower(b)
end)