diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-07 22:33:50 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-08 11:35:51 +0200 |
commit | 1978c49bea5b439d993067c055cec47e70db8fd6 (patch) | |
tree | 255caea96a13f95564e6b631be9a4ac55ce33cd9 /src/maildir-expunge.cc | |
parent | 3b1278f5459514a6d6364f068ff97b8a0432057b (diff) |
minor refactoring
Diffstat (limited to 'src/maildir-expunge.cc')
-rw-r--r-- | src/maildir-expunge.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/maildir-expunge.cc b/src/maildir-expunge.cc index 75c8f3d..a63f354 100644 --- a/src/maildir-expunge.cc +++ b/src/maildir-expunge.cc @@ -1,9 +1,10 @@ -/** -------------------------------------------------------------------- +/** * @file maildir-expunge.cc * @brief Implementation of the Maildir class. * @author Andreas Aardal Hanssen * @date 2002-2005 - * ----------------------------------------------------------------- **/ + */ + #include "iodevice.h" #include "iofactory.h" #include "maildir.h" @@ -13,35 +14,32 @@ #include <unistd.h> -using namespace ::std; using namespace Binc; -//------------------------------------------------------------------------ void Maildir::expungeMailbox(void) { if (readOnly) return; Mailbox::iterator i = begin(SequenceSet::all(), SQNR_MODE | INCLUDE_EXPUNGED); - bool success = true; - for (; success && i != end(); ++i) { + for (bool success = true; success && i != end(); ++i) { MaildirMessage &message = reinterpret_cast<MaildirMessage &>(*i); if ((message.getStdFlags() & Message::F_DELETED) == 0) continue; message.setExpunged(); - const string &id = message.getUnique(); + const std::string &id = message.getUnique(); // The message might be gone already MaildirIndexItem *item = index.find(id); if (!item) continue; - string fpath = path + "/cur/" + item->fileName; + std::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) << std::endl; break; } |