Skip to content

Commit 589d8dd

Browse files
committed
We must not call qsort in recursive function.
1 parent e957b48 commit 589d8dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dir.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,13 @@ dir_list_file(parray *files, const char *root, const char *exclude[], bool omit_
260260
fclose(black_list_file);
261261
parray_qsort(black_list, BlackListCompare);
262262
dir_list_file_internal(files, root, exclude, omit_symlink, add_root, black_list);
263+
parray_qsort(files, pgFileComparePath);
263264
}
264265
else
266+
{
265267
dir_list_file_internal(files, root, exclude, omit_symlink, add_root, NULL);
268+
parray_qsort(files, pgFileComparePath);
269+
}
266270
}
267271

268272
void
@@ -406,8 +410,6 @@ dir_list_file_internal(parray *files, const char *root, const char *exclude[],
406410

407411
break; /* pseudo loop */
408412
}
409-
410-
parray_qsort(files, pgFileComparePath);
411413
}
412414

413415
/* print mkdirs.sh */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy