]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Mbox.pm
treewide: run update-copyrights from gnulib for 2019
[public-inbox.git] / lib / PublicInbox / Mbox.pm
index 1f9ac6ec88cfd1a0989a0da5f7d44ab8590230cd..5693d30b1c5ab80ce08fe56f694ffd84b94d7522 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2015-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # Streaming (via getline) interface for formatting messages as an mboxrd.
@@ -24,11 +24,10 @@ sub subject_fn ($) {
        # no need for full Email::MIME, here
        if ($fn =~ /=\?/) {
                eval { $fn = Encode::decode('MIME-Header', $fn) };
-               $fn = 'no-subject' if $@;
+               return 'no-subject' if $@;
        }
        $fn =~ s/^re:\s+//i;
-       $fn = to_filename($fn);
-       $fn eq '' ? 'no-subject' : $fn;
+       $fn eq '' ? 'no-subject' : to_filename($fn);
 }
 
 sub mb_stream {