Alexandre Julliard : patches: Provide a replacement for empty mail headers.

Alexandre Julliard julliard at winehq.org
Tue Jul 20 14:01:54 CDT 2010


Module: tools
Branch: master
Commit: e1084dc4a46e9a6c63c8a7901c16c06886f223ba
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=e1084dc4a46e9a6c63c8a7901c16c06886f223ba

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jul 20 20:33:07 2010 +0200

patches: Provide a replacement for empty mail headers.

---

 patches/filter |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/patches/filter b/patches/filter
index 8a9bf9c..bed4dca 100755
--- a/patches/filter
+++ b/patches/filter
@@ -154,8 +154,8 @@ sub decode_parts(@)
 
 my $message = Email::MIME->new( join("",<STDIN>) );
 
-printf "From: %s\n", encode_utf8($message->Email::Simple::header("from"));
-printf "Subject: %s\n", encode_utf8($message->Email::Simple::header("subject"));
+printf "From: %s\n", encode_utf8($message->Email::Simple::header("from") || "(unknown)");
+printf "Subject: %s\n", encode_utf8($message->Email::Simple::header("subject") || "(none)");
 printf "Message-Id: %s\n", $message->header("message-id");
 printf "Date: %s\n", $message->header("date");
 print "\n";




More information about the wine-cvs mailing list