Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_file/filelist.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 748a0bd884c..113c7e77d73 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -188,8 +188,15 @@ static int compare_name(const void *a1, const void *a2)
if (strcmp(entry2->relname, ".") == 0) return (1);
if (strcmp(entry1->relname, "..") == 0) return (-1);
if (strcmp(entry2->relname, "..") == 0) return (1);
-
- return (BLI_natstrcmp(entry1->relname, entry2->relname));
+
+ {
+ int cmp = BLI_natstrcmp(entry1->relname, entry2->relname);
+ if (cmp == 0) {
+ /* when strings are a case insensitive match, we don't want a random order for qsort [#38303] */
+ cmp = strcmp(entry1->relname, entry2->relname);
+ }
+ return cmp;
+ }
}
static int compare_date(const void *a1, const void *a2)