summaryrefslogtreecommitdiffstats
path: root/apps/filetree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/filetree.c')
-rw-r--r--apps/filetree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/filetree.c b/apps/filetree.c
index 5c97faa9d8..107163add5 100644
--- a/apps/filetree.c
+++ b/apps/filetree.c
@@ -258,7 +258,8 @@ static int compare(const void* p1, const void* p2)
case SORT_ALPHA:
case SORT_ALPHA_REVERSED:
{
- return cmp_data._compar(e1->name, e2->name, MAX_PATH);
+ return cmp_data._compar(e1->name, e2->name, MAX_PATH) *
+ (criteria == SORT_ALPHA_REVERSED ? -1 : 1);
}
}