You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2005/06/01 00:34:56 UTC
svn commit: r179299 - /spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm
Author: felicity
Date: Tue May 31 15:34:55 2005
New Revision: 179299
URL: http://svn.apache.org/viewcvs?rev=179299&view=rev
Log:
bug 4328: still have issues getting filename from parsed part. this commit makes it very explicit where the info should come from.
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm?rev=179299&r1=179298&r2=179299&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm Tue May 31 15:34:55 2005
@@ -744,11 +744,15 @@
# attempt to figure out a name for this attachment if there is one ...
my $disp = $part_msg->header('content-disposition') || '';
- my($filename) = $disp =~ /name="?([^\";]+)"?/i || $ct[3];
+ if ($disp =~ /name="?([^\";]+)"?/i) {
+ $part_msg->{'name'} = $1;
+ }
+ elsif ($ct[3]) {
+ $part_msg->{'name'} = $ct[3];
+ }
$part_msg->{'raw'} = $body;
$part_msg->{'boundary'} = $boundary;
- $part_msg->{'name'} = $filename if $filename;
# If this part is a message/* part, and the parent isn't also a
# message/* part (ie: the main part) go ahead and parse into a tree.