Make sorting case-insensitive so that "aaa" and "AAA" end up next to each other

This commit is contained in:
Sebastian Pipping 2012-06-25 21:39:37 +02:00 committed by Sebastian Lohff
parent 0df9c56214
commit dece73be04
1 changed files with 1 additions and 1 deletions

View File

@ -399,7 +399,7 @@ class DirListingHandler(FileBaseHandler):
dir_items = list() dir_items = list()
file_items = list() file_items = list()
for item in [".."] + sorted(os.listdir(path)): for item in [".."] + sorted(os.listdir(path), key=lambda x:x.lower()):
# create path to item # create path to item
itemPath = os.path.join(path, item) itemPath = os.path.join(path, item)