summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-07-22 16:39:17 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-07-22 16:39:17 +0000
commitc132c486771cd72ef7aea70eeb8876a6481efbc6 (patch)
tree9d2b4a2030231d5d2b6842a0715443cb8395eaa8 /apps/tree.c
parente0d88a11d9e0d8c29fc1cea507f7ebdf1e07bf7a (diff)
Loudness, Superbass and sorting patch by Heikki Hannikainen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1401 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c
index d15547d048..237246d41e 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -114,7 +114,10 @@ static int compare(const void* p1, const void* p2)
struct entry* e2 = *(struct entry**)p2;
if (( e1->attr & ATTR_DIRECTORY ) == ( e2->attr & ATTR_DIRECTORY ))
- return strncasecmp(e1->name, e2->name, TREE_MAX_FILENAMELEN);
+ if (global_settings.sort_case)
+ return strncmp(e1->name, e2->name, TREE_MAX_FILENAMELEN);
+ else
+ return strncasecmp(e1->name, e2->name, TREE_MAX_FILENAMELEN);
else
return ( e2->attr & ATTR_DIRECTORY ) - ( e1->attr & ATTR_DIRECTORY );
}