summaryrefslogtreecommitdiff
path: root/src/operator-list.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/operator-list.cc')
-rw-r--r--src/operator-list.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/operator-list.cc b/src/operator-list.cc
index b304e08..7e65a11 100644
--- a/src/operator-list.cc
+++ b/src/operator-list.cc
@@ -64,7 +64,8 @@ Operator::ProcessResult ListOperator::process(Depot &depot, Request &command)
string regex = toRegex(wildcard, depot.getDelimiter());
string wildcardLower = regex;
lowercase(wildcardLower);
- if (wildcardLower.substr(0, 6) == "^inbox") regex = "^[iI][nN][bB][oO][xX]" + regex.substr(6);
+ if (wildcardLower.substr(0, 6) == "^inbox")
+ regex = "^[iI][nN][bB][oO][xX]" + regex.substr(6);
// remove leading or trailing delimiter in reference
string ref = command.getMailbox();
@@ -81,7 +82,9 @@ Operator::ProcessResult ListOperator::process(Depot &depot, Request &command)
// a map from mailbox name to flags
std::map<string, unsigned int> mailboxes;
- if (cacheTimeout == 0 || cacheTimeout < time(nullptr) - LIST_CACHE_TIMEOUT || session.mailboxchanges) {
+ if (cacheTimeout == 0 || cacheTimeout < time(nullptr) - LIST_CACHE_TIMEOUT
+ || session.mailboxchanges)
+ {
session.mailboxchanges = false;
// read through all entries in depository.
@@ -155,7 +158,9 @@ Operator::ProcessResult ListOperator::process(Depot &depot, Request &command)
// finally, print all mailbox entries with flags.
for (auto i = mailboxes.begin(); i != mailboxes.end(); ++i) {
- if (ref == "" || (ref.length() <= i->first.length() && ref == i->first.substr(0, ref.length()))) {
+ if (ref == ""
+ || (ref.length() <= i->first.length() && ref == i->first.substr(0, ref.length())))
+ {
if (regexMatch(i->first.substr(ref.length()), regex) == 0) {
bincClient << "* LIST (";
string sep = "";
@@ -185,7 +190,8 @@ Operator::ProcessResult ListOperator::process(Depot &depot, Request &command)
if (flags & DIR_NOINFERIORS) bincClient << sep << "\\Noinferiors";
- bincClient << ") \"" << depot.getDelimiter() << "\" " << toImapString(i->first) << std::endl;
+ bincClient << ") \"" << depot.getDelimiter() << "\" " << toImapString(i->first)
+ << std::endl;
}
}
}