From 8b43202e1f42b744d15ea8baa63d047997304e28 Mon Sep 17 00:00:00 2001 From: Carsten Pfeiffer Date: Sat, 28 Apr 2001 21:21:03 +0000 Subject: [PATCH] speedup regular checking (return immediately when the mbox is of 0 size) svn path=/trunk/kdenetwork/kmail/; revision=94340 --- kmacctlocal.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kmacctlocal.cpp b/kmacctlocal.cpp index 965b5730e..a6eee83c8 100644 --- a/kmacctlocal.cpp +++ b/kmacctlocal.cpp @@ -5,6 +5,7 @@ #endif #include +#include #include "kmacctlocal.h" #include "kmfolder.h" #include "kmmessage.h" @@ -86,6 +87,14 @@ void KMAcctLocal::pseudoAssign(KMAccount *account) void KMAcctLocal::processNewMail(bool) { QTime t; + hasNewMail = false; + + QFileInfo fi( location() ); + if ( fi.size() == 0 ) { + emit finishedCheck(hasNewMail); + return; + } + KMFolder mailFolder(NULL, location()); mailFolder.setLockType( mLock ); if ( mLock == procmail_lockfile) @@ -97,7 +106,6 @@ void KMAcctLocal::processNewMail(bool) KMMessage* msg; bool addedOk; - hasNewMail = false; if (!mFolder) { emit finishedCheck(hasNewMail); return;