better regex matchnig behavior
This commit is contained in:
parent
f715c29c67
commit
9167097d11
2 changed files with 10 additions and 11 deletions
|
|
@ -236,8 +236,10 @@ sub parseParts {
|
|||
my $body = $message->bodyhandle;
|
||||
if (defined $body) {
|
||||
my $disposition = $message->head->get("Content-Disposition");
|
||||
$disposition =~ m/filename=\"(.*)\"/;
|
||||
my $filename = $1;
|
||||
my $filename = "";
|
||||
if($disposition =~ m/filename=\"(.*)\"/) {
|
||||
$filename = $1;
|
||||
}
|
||||
return [{content => $body->as_string, type=>$type, filename=>$filename}];
|
||||
}
|
||||
my @parts = ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue