From dece73be04a97474e0cfa2675f6a297c472da293 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 25 Jun 2012 21:39:37 +0200 Subject: [PATCH] Make sorting case-insensitive so that "aaa" and "AAA" end up next to each other --- servefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servefile b/servefile index 8e0b5f9..883bcb8 100755 --- a/servefile +++ b/servefile @@ -399,7 +399,7 @@ class DirListingHandler(FileBaseHandler): dir_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 itemPath = os.path.join(path, item)