commit 05af1a1be98bb98f21b80d7d34fdc4ab981f4881
parent 0ca1ccf7f2e9e3587700434fa6f773a291903bcf
Author: lumidify <nobody@lumidify.org>
Date:   Thu,  9 Apr 2020 14:23:13 +0200
Change to DFS and fix test
Diffstat:
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lumia.pl b/lumia.pl
@@ -53,7 +53,7 @@ sub make_file_iter {
 	my ($file_func, $dir_func, @queue) = @_;
 	return sub {
 		while (@queue) {
-			my $file = shift @queue;
+			my $file = pop @queue;
 			if (-d $file) {
 				my $new_files = $dir_func->($file);
 				next if !defined $new_files;
@@ -1333,7 +1333,7 @@ B<addnew> command in any subdirectory when you've added new files there.
 
 =head1 PERFORMANCE
 
-Due to the extensive use of iterators and the author's bad life decisions,
+Due to the extensive use of iterators and the author's bad life choices,
 some functions, such as B<addnew> and B<check>, run more slowly than they
 would if they were programmed more efficiently, especially on many small
 files and folders. Too bad.
diff --git a/tests/filenames.sh b/tests/filenames.sh
@@ -11,7 +11,7 @@ touch -- ' a/-d'
 touch -- '-b/$\%")'
 cd ..
 
-../lumia.pl addnew tmp
+../lumia.pl addnew tmp | sort
 ../lumia.pl check tmp | sort
 cat 'tmp/ a/.lumidify_archive_cksums' | sort
 ../lumia.pl rm 'tmp/ a/-d'
diff --git a/tests/filenames.txt b/tests/filenames.txt
@@ -1,10 +1,10 @@
-Added "tmp/ a"
-Added "tmp/-b"
-Added "tmp/-c   
 
 "
+Added "tmp/ a"
 Added "tmp/ a/-d"
+Added "tmp/-b"
 Added "tmp/-b/$\%")"
+Added "tmp/-c   
 
 
 /.lumidify_archive_cksums