diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-07 23:30:49 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-08 11:35:51 +0200 |
commit | 40ee1fcfb77731f3cd7385882f41630af6aedb33 (patch) | |
tree | 6b13dd75ca9cfbac7daef4f0d5dc2e342ee9ef7d /src/maildir-scan.cc | |
parent | 1978c49bea5b439d993067c055cec47e70db8fd6 (diff) |
reduce line limit to 95
Diffstat (limited to 'src/maildir-scan.cc')
-rw-r--r-- | src/maildir-scan.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/maildir-scan.cc b/src/maildir-scan.cc index 65548f7..09f334d 100644 --- a/src/maildir-scan.cc +++ b/src/maildir-scan.cc @@ -27,7 +27,8 @@ Lock::Lock(const string &path) int lockfd = -1; while ((lockfd = ::open(lock.c_str(), O_CREAT | O_WRONLY | O_EXCL, 0666)) == -1) { if (errno != EEXIST) { - bincWarning << "unable to lock mailbox: " << lock << ", " << string(strerror(errno)) << endl; + bincWarning << "unable to lock mailbox: " << lock << ", " << string(strerror(errno)) + << endl; return; } @@ -38,8 +39,8 @@ Lock::Lock(const string &path) if (unlink(lock.c_str()) == 0) { continue; } else { - bincWarning << "failed to force mailbox lock: " << lock << ", " << string(strerror(errno)) - << endl; + bincWarning << "failed to force mailbox lock: " << lock << ", " + << string(strerror(errno)) << endl; } } } else if (errno != ENOENT) { @@ -179,7 +180,8 @@ Maildir::ScanResult Maildir::scan(bool forceScan) // start with a dot. Do not try to extract information from unique // names." - The Maildir spec from cr.yp.to string filename = pdirent->d_name; - if (filename[0] == '.' || filename.find(':') != string::npos || filename.find('/') != string::npos) + if (filename[0] == '.' || filename.find(':') != string::npos + || filename.find('/') != string::npos) continue; string fullfilename = newpath + filename; @@ -223,7 +225,9 @@ Maildir::ScanResult Maildir::scan(bool forceScan) bool ours = false; for (const auto &newIt : newMessages) { - if ((filename == newIt.getUnique()) && (newIt.getInternalFlags() & MaildirMessage::Committed)) { + if ((filename == newIt.getUnique()) + && (newIt.getInternalFlags() & MaildirMessage::Committed)) + { ours = true; break; } @@ -240,8 +244,8 @@ Maildir::ScanResult Maildir::scan(bool forceScan) // move files from new/ to cur/ string newName = curpath + pdirent->d_name; if (rename((newpath + pdirent->d_name).c_str(), (newName + ":2,").c_str()) != 0) { - bincWarning << "error moving messages from new to cur: skipping " << newpath << pdirent->d_name - << ": " << strerror(errno) << endl; + bincWarning << "error moving messages from new to cur: skipping " << newpath + << pdirent->d_name << ": " << strerror(errno) << endl; continue; } } |