зеркало из https://github.com/mozilla/pjs.git
fix comma handling when breaking up long imap fetch statements, initial patch by lee.essen@db.com, r/sr=bienvenu
This commit is contained in:
Родитель
9d5f416cab
Коммит
ca4f1bb3dc
|
@ -428,8 +428,6 @@ void AllocateImapUidString(PRUint32 *msgUids, PRUint32 &msgCount,
|
|||
returnString.AppendInt(startSequence);
|
||||
returnString += ':';
|
||||
returnString.AppendInt(curSequenceEnd);
|
||||
if (!lastKey)
|
||||
returnString += ',';
|
||||
startSequence = nextKey;
|
||||
curSequenceEnd = startSequence;
|
||||
curFlagStateIndex = -1;
|
||||
|
@ -439,8 +437,6 @@ void AllocateImapUidString(PRUint32 *msgUids, PRUint32 &msgCount,
|
|||
startSequence = nextKey;
|
||||
curSequenceEnd = startSequence;
|
||||
returnString.AppendInt(msgUids[keyIndex]);
|
||||
if (!lastKey)
|
||||
returnString += ',';
|
||||
curFlagStateIndex = -1;
|
||||
}
|
||||
// check if we've generated too long a string - if there's no flag state,
|
||||
|
@ -451,6 +447,10 @@ void AllocateImapUidString(PRUint32 *msgUids, PRUint32 &msgCount,
|
|||
msgCount = total;
|
||||
break;
|
||||
}
|
||||
// If we are not the last item then we need to add the comma
|
||||
// but it's important we do it here, after the length check
|
||||
if (!lastKey)
|
||||
returnString += ',';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче