Adjust attachment index after refactoring

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@103 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2007-11-09 11:03:30 +00:00
parent 3010981b05
commit 44e4ebf07c
1 changed files with 3 additions and 3 deletions

View File

@ -887,10 +887,10 @@ public class ExchangeSession {
// detect part boundary start
if (line.equals(mimeHeader.boundary)) {
Attachment currentAttachment = null;
Attachment currentAttachment;
String currentAttachmentName = null;
if (attachmentIndex < attachments.size()) {
currentAttachment = attachments.get(attachmentIndex);
if (attachmentIndex > 0 && attachmentIndex <= attachments.size()) {
currentAttachment = attachments.get(attachmentIndex - 1);
currentAttachmentName = currentAttachment.name;
}