Update of /cvsroot/mahogany/M/src/mail
In directory usw-pr-cvs1:/tmp/cvs-serv29179/src/mail
Modified Files:
MailFolderCC.cpp
Log Message:
added "space hack" to ListFolders needed by the migration tool
Index: MailFolderCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MailFolderCC.cpp,v
retrieving revision 1.641
retrieving revision 1.642
diff -b -u -2 -r1.641 -r1.642
--- MailFolderCC.cpp 12 Sep 2002 02:36:50 -0000 1.641
+++ MailFolderCC.cpp 8 Oct 2002 21:27:55 -0000 1.642
@@ -5149,9 +5149,14 @@
CHECK_DEAD(_T("Cannot list subfolder of the closed folder '%s'."));
+ CHECK_RET( asmf, _T("no ASMailFolder in ListFolders") );
+
String spec = m_ImapSpec;
- // make sure that there is a folder name delimiter before pattern - this
- // only makes sense for non empty spec
- if ( !spec.empty() )
+ // make sure that there is a folder name delimiter before pattern -- this is
+ // convenient for the calling code however it makes it impossible to
+ // enumerate all folders under the given one including itself, so we use a
+ // dirty hack: empty pattern is just like "*" except that we don't add the
+ // delimiter before it
+ if ( !spec.empty() && !pattern.empty() )
{
char ch = spec.Last();
@@ -5166,7 +5171,5 @@
}
- spec << reference << pattern;
-
- ASSERT(asmf);
+ spec << reference << (pattern.empty() ? String(_T("*")) : pattern);
// set user data (retrieved by mm_list)
-------------------------------------------------------
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