From 7ac47b9ffe634816372488ebed8e81d7f4ec4ce1 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Fri, 24 Jan 2025 15:46:27 +0200 Subject: [PATCH] bdk: dirlist: switch to alphabetical ordering --- bdk/utils/dirlist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bdk/utils/dirlist.c b/bdk/utils/dirlist.c index 77174aa..b1de140 100644 --- a/bdk/utils/dirlist.c +++ b/bdk/utils/dirlist.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2024 CTCaer + * Copyright (c) 2018-2025 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -82,12 +82,12 @@ dirlist_t *dirlist(const char *directory, const char *pattern, bool includeHidde // Terminate name list. dir_entries->name[k] = NULL; - // Reorder ini files by ASCII ordering. + // Reorder ini files Alphabetically. for (u32 i = 0; i < k - 1 ; i++) { for (u32 j = i + 1; j < k; j++) { - if (strcmp(dir_entries->name[i], dir_entries->name[j]) > 0) + if (strcasecmp(dir_entries->name[i], dir_entries->name[j]) > 0) { char *tmp = dir_entries->name[i]; dir_entries->name[i] = dir_entries->name[j];