summaryrefslogtreecommitdiff
path: root/src/maildir-expunge.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/maildir-expunge.cc')
-rw-r--r--src/maildir-expunge.cc20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/maildir-expunge.cc b/src/maildir-expunge.cc
index 3091d7f..75c8f3d 100644
--- a/src/maildir-expunge.cc
+++ b/src/maildir-expunge.cc
@@ -2,16 +2,17 @@
* @file maildir-expunge.cc
* @brief Implementation of the Maildir class.
* @author Andreas Aardal Hanssen
- * @date 2002-2005
+ * @date 2002-2005
* ----------------------------------------------------------------- **/
-#include <unistd.h>
-#include <errno.h>
-
#include "iodevice.h"
#include "iofactory.h"
#include "maildir.h"
#include "maildirmessage.h"
+#include <errno.h>
+
+#include <unistd.h>
+
using namespace ::std;
using namespace Binc;
@@ -20,14 +21,13 @@ void Maildir::expungeMailbox(void)
{
if (readOnly) return;
- Mailbox::iterator i = begin(SequenceSet::all(), SQNR_MODE|INCLUDE_EXPUNGED);
+ Mailbox::iterator i = begin(SequenceSet::all(), SQNR_MODE | INCLUDE_EXPUNGED);
bool success = true;
for (; success && i != end(); ++i) {
MaildirMessage &message = reinterpret_cast<MaildirMessage &>(*i);
- if ((message.getStdFlags() & Message::F_DELETED) == 0)
- continue;
+ if ((message.getStdFlags() & Message::F_DELETED) == 0) continue;
message.setExpunged();
@@ -35,15 +35,13 @@ void Maildir::expungeMailbox(void)
// The message might be gone already
MaildirIndexItem *item = index.find(id);
- if (!item)
- continue;
+ if (!item) continue;
string fpath = path + "/cur/" + item->fileName;
while (unlink(fpath.c_str()) != 0) {
if (errno != ENOENT) {
- bincWarning << "unable to remove " << fpath << ": "
- << strerror(errno) << endl;
+ bincWarning << "unable to remove " << fpath << ": " << strerror(errno) << endl;
break;
}