mirror of https://github.com/MidnightCommander/mc
Ticket #3496: (dir_list_sort): do not call qsort for 'unsorted' sort order
...since qsort may shuffle first and last files in some lists. Thanks Nicolas Rybkin for the original patch. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
11645aadb9
commit
280bf87680
|
@ -508,7 +508,7 @@ dir_list_sort (dir_list * list, GCompareFunc sort, const dir_sort_options_t * so
|
|||
file_entry_t *fentry;
|
||||
int dot_dot_found = 0;
|
||||
|
||||
if (list->len < 2)
|
||||
if (list->len < 2 || sort == (GCompareFunc) unsorted)
|
||||
return;
|
||||
|
||||
/* If there is an ".." entry the caller must take care to
|
||||
|
|
Loading…
Reference in New Issue