You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by do...@apache.org on 2005/06/06 01:11:07 UTC
svn commit: r180169 -
/spamassassin/branches/3.0/lib/Mail/SpamAssassin/Message.pm
Author: dos
Date: Sun Jun 5 16:11:06 2005
New Revision: 180169
URL: http://svn.apache.org/viewcvs?rev=180169&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/branches/3.0/lib/Mail/SpamAssassin/Message.pm
Modified: spamassassin/branches/3.0/lib/Mail/SpamAssassin/Message.pm
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.0/lib/Mail/SpamAssassin/Message.pm?rev=180169&r1=180168&r2=180169&view=diff
==============================================================================
--- spamassassin/branches/3.0/lib/Mail/SpamAssassin/Message.pm (original)
+++ spamassassin/branches/3.0/lib/Mail/SpamAssassin/Message.pm Sun Jun 5 16:11:06 2005
@@ -586,11 +586,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.