iterate over directories in sorted order
This makes behaviour more deterministic, and makes debugging easier.
This commit is contained in:
parent
e9ad20576c
commit
2a647d125f
1 changed files with 5 additions and 5 deletions
|
@ -432,7 +432,7 @@ sub stow_contents {
|
|||
closedir $DIR;
|
||||
|
||||
NODE:
|
||||
for my $node (@listing) {
|
||||
for my $node (sort @listing) {
|
||||
next NODE if $node eq '.';
|
||||
next NODE if $node eq '..';
|
||||
my $node_target = join_paths($target_subdir, $node);
|
||||
|
@ -743,7 +743,7 @@ sub unstow_contents {
|
|||
closedir $DIR;
|
||||
|
||||
NODE:
|
||||
for my $node (@listing) {
|
||||
for my $node (sort @listing) {
|
||||
next NODE if $node eq '.';
|
||||
next NODE if $node eq '..';
|
||||
my $node_target = join_paths($target_subdir, $node);
|
||||
|
@ -1148,7 +1148,7 @@ sub cleanup_invalid_links {
|
|||
closedir $DIR;
|
||||
|
||||
NODE:
|
||||
for my $node (@listing) {
|
||||
for my $node (sort @listing) {
|
||||
next NODE if $node eq '.';
|
||||
next NODE if $node eq '..';
|
||||
|
||||
|
@ -1247,7 +1247,7 @@ sub foldable {
|
|||
my $parent_in_pkg = '';
|
||||
|
||||
NODE:
|
||||
for my $node (@listing) {
|
||||
for my $node (sort @listing) {
|
||||
next NODE if $node eq '.';
|
||||
next NODE if $node eq '..';
|
||||
|
||||
|
@ -1331,7 +1331,7 @@ sub fold_tree {
|
|||
closedir $DIR;
|
||||
|
||||
NODE:
|
||||
for my $node (@listing) {
|
||||
for my $node (sort @listing) {
|
||||
next NODE if $node eq '.';
|
||||
next NODE if $node eq '..';
|
||||
next NODE if not $self->is_a_node(join_paths($target_subdir, $node));
|
||||
|
|
Loading…
Reference in a new issue