commit 9c64f0abe4b5dda8046d6a41c4c062d2624bed27
parent ab44dc285cafc88b2d942ad8249468e6f99e7117
Author: andreaha <andreaha@b31fe1f4-c0d1-0310-8000-a34f4ae90293>
Date: Sat, 21 Feb 2004 10:07:52 +0000
- SELECT also reports RECENT and EXISTS on empty mailboxes.
git-svn-id: file:///home/cwright/convert/bincimap/trunk@38 b31fe1f4-c0d1-0310-8000-a34f4ae90293
Diffstat:
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/operator-select.cc b/src/operator-select.cc
@@ -119,7 +119,7 @@ Operator::ProcessResult SelectOperator::process(Depot &depot,
// re-scan.
pendingUpdates(mailbox, PendingUpdates::EXISTS
| PendingUpdates::RECENT,
- false);
+ false, true);
// unseen
if (unseen != -1)
diff --git a/src/pendingupdates.cc b/src/pendingupdates.cc
@@ -206,7 +206,7 @@ unsigned int PendingUpdates::flagupdates_const_iterator::second(void) const
}
//--------------------------------------------------------------------
-bool Binc::pendingUpdates(Mailbox *mailbox, int type, bool rescan)
+bool Binc::pendingUpdates(Mailbox *mailbox, int type, bool rescan, bool showAll)
{
Session &session = Session::getInstance();
IO &com = IOFactory::getInstance().get(1);
@@ -230,10 +230,10 @@ bool Binc::pendingUpdates(Mailbox *mailbox, int type, bool rescan)
}
}
- if ((type & PendingUpdates::EXISTS) && p.newExists())
+ if (((type & PendingUpdates::EXISTS) && p.newExists()) || showAll)
com << "* " << p.getExists() << " EXISTS" << endl;
- if ((type & PendingUpdates::RECENT) && p.newRecent())
+ if (((type & PendingUpdates::RECENT) && p.newRecent() || showAll))
com << "* " << p.getRecent() << " RECENT" << endl;
if (type & PendingUpdates::FLAGS) {
diff --git a/src/pendingupdates.h b/src/pendingupdates.h
@@ -119,7 +119,7 @@ namespace Binc {
bool newrecent;
};
- bool Binc::pendingUpdates(Mailbox *, int type, bool rescan);
+ bool Binc::pendingUpdates(Mailbox *, int type, bool rescan, bool showAll = false);
}
#endif