about summary refs log tree commit homepage
path: root/lib/PublicInbox/Mbox.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Mbox.pm')
-rw-r--r--lib/PublicInbox/Mbox.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm
index 8726b9f6..115321c6 100644
--- a/lib/PublicInbox/Mbox.pm
+++ b/lib/PublicInbox/Mbox.pm
@@ -52,9 +52,9 @@ sub async_eml { # ->{async_eml} for async_blob_cb
 
 sub res_hdr ($$) {
         my ($ctx, $subject) = @_;
-        my $fn = $subject // 'no-subject';
+        my $fn = $subject // '';
         $fn =~ s/^re:\s+//i;
-        $fn = $fn eq '' ? 'no-subject' : to_filename($fn);
+        $fn = to_filename($fn) // 'no-subject';
         my @hdr = ('Content-Type');
         if ($ctx->{-inbox}->{obfuscate}) {
                 # obfuscation is stupid, but maybe scrapers are, too...