Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 1083355 - [email/IMAP] Fix message sequence number off-by-one ordinal/count error. r=mcav #28523

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions apps/email/js/ext/imap/jobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,10 @@ ImapJobDriver.prototype = {
nextId = targetConn.box.uidNext;
} else {
usingUid = false;
nextId = targetConn.box.exists;
// Message sequence numbers are 1-based, so if 0 exist, then 1 is
// the sequence number of the next message. If 1 exists, its
// number is 1, and the next number is 2. And so on.
nextId = targetConn.box.exists + 1;
}

folderConn._conn.copyMessages(serverIds.join(','),
Expand Down Expand Up @@ -744,7 +747,6 @@ ImapJobDriver.prototype = {
}
var namer = guidToNamer[guid];
stateDelta.serverIdMap[namer.suid] = msg.uid;
uidnext = msg.uid + 1;
var newSuid = state.moveMap[namer.suid];
var newId =
parseInt(newSuid.substring(newSuid.lastIndexOf('/') + 1));
Expand Down
1 change: 0 additions & 1 deletion apps/email/js/ext/worker-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
'stringencoding': 'ext/stringencoding',
'tcp-socket': 'ext/tcp-socket',
'utf7': 'ext/utf7',
'wmsy': 'ext/wmsy',
'wo-utf7': 'ext/wo-utf7'
// </gelam-ext>
},
Expand Down