From 4754fd0fab3e95d95359fc8c85e64a19bc4a209f Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 27 Apr 2005 11:01:28 +0000 Subject: Ignore filenames starting with '.' for message files. --- src/messaging/maildir/maildirUtils.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/messaging/maildir/maildirUtils.cpp') diff --git a/src/messaging/maildir/maildirUtils.cpp b/src/messaging/maildir/maildirUtils.cpp index 4476b3dd..091fd871 100644 --- a/src/messaging/maildir/maildirUtils.cpp +++ b/src/messaging/maildir/maildirUtils.cpp @@ -88,6 +88,20 @@ const bool maildirUtils::isSubfolderDirectory(const utility::file& file) } +const bool maildirUtils::isMessageFile(const utility::file& file) +{ + // Ignore files which name begins with '.' + if (file.isFile() && + file.getFullPath().getLastComponent().getBuffer().length() >= 1 && + file.getFullPath().getLastComponent().getBuffer()[0] != '.') + { + return (true); + } + + return (false); +} + + const utility::file::path::component maildirUtils::extractId (const utility::file::path::component& filename) { -- cgit v1.2.3