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

Commit

Permalink
Bug 1083355 - [email/IMAP] Fix message sequence number off-by-one ord…
Browse files Browse the repository at this point in the history
…inal/count error. r=mcav

land mozilla-b2g/gaia-email-libs-and-more#373
  • Loading branch information
asutherland committed Feb 27, 2015
1 parent 6d71590 commit 0fc6d4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 0fc6d4c

Please sign in to comment.