1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 15:52:25 +00:00

TOOLS: autoload.lua: sort files case insensitive

Suggested by a user. The suggested code which was added her comes from
PIL.
This commit is contained in:
wm4 2015-04-18 20:33:35 +02:00
parent d8dd4b6c39
commit f51952441e

View File

@ -28,7 +28,9 @@ function find_and_add_entries()
if files == nil then
return
end
table.sort(files)
table.sort(files, function (a, b)
return string.lower(a) < string.lower(b)
end)
if dir == "." then
dir = ""
end