Commit Diff
Commit:
c971fcee68657ed9c77e081193fe84c1041ac662
From:
Omar Polo <op@omarpolo.com>
Date:
Thu Aug 25 20:48:02 2022 UTC
Message:
mexp: defer skip test after $tid is set otherwise we run with an undef $tid when processing new replies to existing threads.
commit - 53bec6d48a4f1c1a066c856e59d22e79087ef7bf
commit + c971fcee68657ed9c77e081193fe84c1041ac662
blob - 64d4d1459c801e681668f29ebab7f82372b840d2
blob + 9fabbaad140e0cab1ec14af09b8ee4773040d49a
--- mexp
+++ mexp
@@ -33,15 +33,15 @@ while (<>) {
$mid = mid2path($mid);
- my $dest = "$outdir/mail/$mid.html";
- next if -f $dest;
-
my $level = length($indent) - 1;
$level = 10 if $indent =~ m/\.\.\d{2}\.\./;
$tid = $mid if $level == 0;
die "unknown tid" unless defined $tid;
+ my $dest = "$outdir/mail/$mid.html";
+ next if -f $dest;
+
open(my $fh, '>', "$dest") or die "can't open $dest: $!";
initpage $fh, $subj;
Omar Polo