aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Net/IMAP
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-07-23 19:15:22 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-07-23 19:15:22 +0200
commit8f6b36ba462b55ea9f600e4402e10672bf2f73ef (patch)
treea81bd6b02baabbdfc01ee940047774f0d9f5bc80 /lib/Net/IMAP
parentdeec7db3634d252228f67446564776b96e3ad0ca (diff)
bugfix
Diffstat (limited to 'lib/Net/IMAP')
-rw-r--r--lib/Net/IMAP/Sync.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Net/IMAP/Sync.pm b/lib/Net/IMAP/Sync.pm
index 517270b..0b95276 100644
--- a/lib/Net/IMAP/Sync.pm
+++ b/lib/Net/IMAP/Sync.pm
@@ -1182,7 +1182,7 @@ sub _select_or_examine($$$) {
$command .= " (QRESYNC ($pcache->{UIDVALIDITY} $pcache->{HIGHESTMODSEQ} "
."1:".($pcache->{UIDNEXT}-1)."))"
if $self->_enabled('QRESYNC') and
- ($pcache->{HIGHESTMODSEQ} // 0) > 0 and ($pcache->{UIDNEXT} // 0) > 0;
+ ($pcache->{HIGHESTMODSEQ} // 0) > 0 and ($pcache->{UIDNEXT} // 0) > 1;
if ($self->{_STATE} eq 'SELECTED' and ($self->_capable('CONDSTORE') or $self->_capable('QRESYNC'))) {
# A mailbox is currently selected and the server advertizes
@@ -1198,11 +1198,8 @@ sub _select_or_examine($$$) {
}
$self->{_STATE} = 'AUTH';
- if ($self->_send($command) eq 'OK') {
- $self->{_STATE} = 'SELECTED';
- } else {
- delete $self->{_SELECTED};
- }
+ $self->_send($command);
+ $self->{_STATE} = 'SELECTED';
}