diff options
Diffstat (limited to 'src/maildir-scanfilesnames.cc')
-rw-r--r-- | src/maildir-scanfilesnames.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/maildir-scanfilesnames.cc b/src/maildir-scanfilesnames.cc index 0bde999..ff5c2d4 100644 --- a/src/maildir-scanfilesnames.cc +++ b/src/maildir-scanfilesnames.cc @@ -1,9 +1,10 @@ -/** -------------------------------------------------------------------- +/** * @file maildir-scanfilesnames.cc * @brief Implementation of the Maildir class. * @author Andreas Aardal Hanssen * @date 2002-2005 - * ----------------------------------------------------------------- **/ + */ + #include "iodevice.h" #include "iofactory.h" #include "maildir.h" @@ -16,23 +17,22 @@ #include <dirent.h> #include <unistd.h> -using namespace ::std; +using std::string; -//------------------------------------------------------------------------ bool Binc::Maildir::scanFileNames(void) const { string curpath = path + "/cur/"; DIR *pdir = opendir(curpath.c_str()); - if (pdir == 0) { + if (pdir == nullptr) { setLastError("when scanning mailbox \"" + path + "\": " + string(strerror(errno))); - bincWarning << getLastError() << endl; + bincWarning << getLastError() << std::endl; return false; } index.clearFileNames(); struct dirent *pdirent; - while ((pdirent = readdir(pdir)) != 0) { + while ((pdirent = readdir(pdir)) != nullptr) { if (!isdigit(pdirent->d_name[0])) continue; string filename = pdirent->d_name; |