]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
lei_saved_search: drop needless comparisons and `next'
authorEric Wong <e@80x24.org>
Sat, 18 Jan 2025 01:26:08 +0000 (01:26 +0000)
committerEric Wong <e@80x24.org>
Tue, 21 Jan 2025 22:36:58 +0000 (22:36 +0000)
The grep(!/\A\.\.?\z/, ...) op already filters out the `.' and
`..' entries from `readdir'.

lib/PublicInbox/LeiSavedSearch.pm

index 83e19357d8a82e71ec4a4e26fd8b2e4fd0573732..0520ff9809149bb46ab928a412c94344f2b622fd 100644 (file)
@@ -85,7 +85,6 @@ sub list {
        print $fh "[include]\n";
        opendir(my $dh, $lss_dir);
        for my $d (sort(grep(!/\A\.\.?\z/, readdir($dh)))) {
-               next if $d eq '.' || $d eq '..';
                my $p = "$lss_dir/$d/lei.saved-search";
                say $fh "\tpath = ", cquote_val($p) if -f $p;
        }