Update of /cvsroot/mahogany/M/src/mail
In directory sc8-pr-cvs1:/tmp/cvs-serv18764/src/mail
Modified Files:
MFCache.cpp
Log Message:
don't give error messages about failing to save cache file more than once
Index: MFCache.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MFCache.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -b -u -2 -r1.22 -r1.23
--- MFCache.cpp 12 Sep 2002 02:36:50 -0000 1.22
+++ MFCache.cpp 12 Jul 2003 18:56:48 -0000 1.23
@@ -100,5 +100,6 @@
// no changes yet
- m_isDirty = false;
+ m_isDirty =
+ m_hasFailedToSave = false;
}
@@ -371,6 +372,13 @@
{
if ( !CacheFile::Save() )
+ {
+ // set a flag to indicate that we shouldn't be called any more by
+ // Flush() -- but we'll still be called from our dtor for one last
+ // attempt to save our contents
+ m_hasFailedToSave = true;
+
return false;
}
+ }
// reset the dirty flag - we're saved now
@@ -423,5 +431,9 @@
void MfStatusCache::Flush()
{
- if ( gs_mfStatusCache && gs_mfStatusCache->IsDirty() )
+ // don't flush the cache repeatedly if we failed to do it, this leads to a
+ // endless stream of annoying message boxes without any good effect
+ if ( gs_mfStatusCache &&
+ gs_mfStatusCache->IsDirty() &&
+ !gs_mfStatusCache->HasFailedToSave() )
{
(void)gs_mfStatusCache->Save();
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates