]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/MdirReader.pm
lei: relax rules for "new" in Maildir
[public-inbox.git] / lib / PublicInbox / MdirReader.pm
index b49c8ceb86eec87d1f56da3e20b5fe3f858d34c2..7a0641fb07f287fe8a9ff17127c3041b5428b3fe 100644 (file)
@@ -61,7 +61,10 @@ sub maildir_each_eml {
                while (defined(my $bn = readdir($dh))) {
                        next if substr($bn, 0, 1) eq '.';
                        my @f = split(/:/, $bn, -1);
-                       next if scalar(@f) != 1;
+
+                       # mbsync and offlineimap both use "2," in "new/"
+                       next if ($f[1] // '2,') ne '2,' || defined($f[2]);
+
                        next if defined($mod) && !shard_ok($bn, $mod, $shard);
                        my $f = $pfx.$bn;
                        my $eml = eml_from_path($f) or next;