Skip to content

Commit

Permalink
Cleaned up TnefPart's ContentDisposition handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jstedfast authored Mar 12, 2019
1 parent 3f5109e commit fd6b17b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions MimeKit/Tnef/TnefPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,9 @@ static void ExtractAttachments (TnefReader reader, BodyBuilder builder)
break;
case TnefPropertyId.AttachDisposition:
text = prop.ReadValueAsString ();
ContentDisposition contentDisposition;
ContentDisposition.TryParse(text, out contentDisposition);
attachment.ContentDisposition = contentDisposition;
break;
if (ContentDisposition.TryParse (text, out ContentDisposition disposition))
attachment.ContentDisposition = disposition;
break;
case TnefPropertyId.AttachData:
if (attachMethod == TnefAttachMethod.EmbeddedMessage) {
var tnef = new TnefPart ();
Expand Down

0 comments on commit fd6b17b

Please sign in to comment.