Skip to content

Commit b1e639e

Browse files
author
Ralph Castain
authored
Merge pull request #3755 from bmwiedemann/sort
Sort directory listings
2 parents 79fd359 + 15359e2 commit b1e639e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autogen.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ sub mca_process_framework {
316316
$mca_found->{$pname}->{$framework}->{found} = 1;
317317
opendir(DIR, $dir) ||
318318
my_die "Can't open $dir directory";
319-
foreach my $d (readdir(DIR)) {
319+
foreach my $d (sort(readdir(DIR))) {
320320
# Skip any non-directory, "base", or any dir that
321321
# begins with "."
322322
next
@@ -628,7 +628,7 @@ sub mpiext_run_global {
628628
my $dir = "$topdir/$ext_prefix";
629629
opendir(DIR, $dir) ||
630630
my_die "Can't open $dir directory";
631-
foreach my $d (readdir(DIR)) {
631+
foreach my $d (sort(readdir(DIR))) {
632632
# Skip any non-directory, "base", or any dir that begins with "."
633633
next
634634
if (! -d "$dir/$d" || $d eq "base" || substr($d, 0, 1) eq ".");
@@ -715,7 +715,7 @@ sub mpicontrib_run_global {
715715
my $dir = "$topdir/$contrib_prefix";
716716
opendir(DIR, $dir) ||
717717
my_die "Can't open $dir directory";
718-
foreach my $d (readdir(DIR)) {
718+
foreach my $d (sort(readdir(DIR))) {
719719
# Skip any non-directory, "base", or any dir that begins with "."
720720
next
721721
if (! -d "$dir/$d" || $d eq "base" || substr($d, 0, 1) eq ".");

0 commit comments

Comments
 (0)