Update of /cvsroot/mahogany/M/src/mail
In directory usw-pr-cvs1:/tmp/cvs-serv18310/src/mail
Modified Files:
MailFolderCC.cpp
Log Message:
don't update status for nameless (hence temporary) folders, this is useless and lead
to errors/asserts in folder tree status update code
Index: MailFolderCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MailFolderCC.cpp,v
retrieving revision 1.643
retrieving revision 1.644
diff -b -u -2 -r1.643 -r1.644
--- MailFolderCC.cpp 13 Oct 2002 12:24:53 -0000 1.643
+++ MailFolderCC.cpp 14 Oct 2002 21:50:35 -0000 1.644
@@ -143,5 +143,4 @@
extern const MOption MP_DEBUG_CCLIENT;
extern const MOption MP_FOLDERPROGRESS_THRESHOLD;
-extern const MOption MP_FOLDER_FILE_DRIVER;
extern const MOption MP_FOLDER_TRY_CREATE;
extern const MOption MP_IMAP_LOOKAHEAD;
@@ -1918,13 +1917,8 @@
};
- ASSERT_MSG( WXSIZEOF(cclient_drivers) == FileMbox_Max,
- _T("forgot to update something") );
+ wxCOMPILE_TIME_ASSERT2( WXSIZEOF(cclient_drivers) == FileMbox_Max,
+ FileMboxFmtMismatch, MfCCCff );
- long format = READ_CONFIG(m_Profile, MP_FOLDER_FILE_DRIVER);
- if ( format < 0 || (size_t)format > FileMbox_Max )
- {
- FAIL_MSG( _T("invalid mailbox format") );
- format = 0;
- }
+ const FileMailboxFormat format = m_mfolder->GetFileMboxFormat();
tmp = "#driver.";
@@ -2228,15 +2222,6 @@
mail_close(msHalfOpened);
- MFolder_obj folder(m_Profile);
- if ( folder )
- {
// remember that we can't open it
- folder->AddFlags(MF_FLAGS_NOSELECT);
- }
- else
- {
- // were we deleted without noticing?
- FAIL_MSG( _T("associated folder somehow disappeared?") );
- }
+ m_mfolder->AddFlags(MF_FLAGS_NOSELECT);
mApplication->SetLastError(M_ERROR_HALFOPENED_ONLY);
@@ -4357,5 +4342,12 @@
// non new messages as well and the flags of the existing ones
// could have been changed from the outside
- MfStatusCache::Get()->InvalidateStatus(GetName());
+ //
+ // NB2: don't do it for the temp (nameless) folders as we don't
+ // cache their status anyhow
+ const String name = GetName();
+ if ( !name.empty() )
+ {
+ MfStatusCache::Get()->InvalidateStatus(name);
+ }
}
}
@@ -4367,5 +4359,10 @@
status.total = 0; // all the other fields are already 0
- MfStatusCache::Get()->UpdateStatus(GetName(), status);
+ // as above, we're not interested in the temporary folder status
+ const String name = GetName();
+ if ( !name.empty() )
+ {
+ MfStatusCache::Get()->UpdateStatus(name, status);
+ }
}
}
@@ -5266,5 +5263,5 @@
{
// not IMAP, let the base class version do it
- self->m_chDelimiter = MailFolder::GetFolderDelimiter();
+ self->m_chDelimiter = MailFolder::GetFolderDelimiter(m_mfolder);
}
}
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates