Update of /cvsroot/mahogany/M/src/mail
In directory usw-pr-cvs1:/tmp/cvs-serv28302/src/mail

Modified Files:
        MailFolderCC.cpp 
Log Message:
don't check for .lock files if the folder doesn't exist yet

Index: MailFolderCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MailFolderCC.cpp,v
retrieving revision 1.644
retrieving revision 1.645
diff -b -u -2 -r1.644 -r1.645
--- MailFolderCC.cpp    14 Oct 2002 21:50:35 -0000      1.644
+++ MailFolderCC.cpp    15 Oct 2002 14:32:11 -0000      1.645
@@ -1909,10 +1909,10 @@
       if ( folderType == MF_FILE )
       {
-         static const char *cclient_drivers[] =
+         static const wxChar *cclient_drivers[] =
          {
-            "mbx",
-            "unix",
-            "mmdf",
-            "tenex"
+            _T("mbx"),
+            _T("unix"),
+            _T("mmdf"),
+            _T("tenex")
          };
 
@@ -1922,9 +1922,8 @@
          const FileMailboxFormat format = m_mfolder->GetFileMboxFormat();
 
-         tmp = "#driver.";
-         tmp << cclient_drivers[format] << '/';
+         tmp << _T("#driver.") << cclient_drivers[format] << _T('/');
 
-         wxLogDebug(_T("Trying to create folder '%s' in %s format."),
-                    GetName().c_str(), cclient_drivers[format]);
+         wxLogDebug(_T("Trying to create folder \"%s\" in %s format."),
+                    m_ImapSpec.c_str(), cclient_drivers[format]);
       }
       else // MF_MH folder
@@ -1933,9 +1932,9 @@
          ASSERT_MSG( folderType == MF_MH, _T("unexpected folder type") );
 
-         tmp = "#driver.mh/";
+         tmp = _T("#driver.mh/");
       }
 
       tmp += m_ImapSpec;
-      mail_create(NIL, (char *)tmp.c_str());
+      mail_create(NIL, (char *)tmp.mb_str()); // const_cast for c-client
    }
 
@@ -2001,4 +2000,8 @@
    }
 
+   // it doesn't make sense to look for a lock on a folder which hasn't been
+   // created yet
+   if ( wxFileExists(file) )
+   {
    // TODO: we should be using c-client's lockname() here
    String lockfile = wxFindFirstFile(file + ".lock*", wxFILE);
@@ -2030,7 +2033,9 @@
             shouldRemove = MDialog_YesNoDialog
                            (
-                              String::Format(
+                                 String::Format
+                                 (
                                  _("The file '%s' is not empty, still remove it?"),
-                                 lockfile.c_str()),
+                                    lockfile.c_str()
+                                 ),
                               NULL,
                               MDIALOG_YESNOTITLE,
@@ -2058,4 +2063,5 @@
       lockfile = wxFindNextFile();
    }
+   }
 #endif // OS_UNIX
 
@@ -4282,6 +4288,12 @@
    if ( !stream || stream->halfopen )
    {
+#ifdef DEBUG
+      if ( !GetName().empty() )
+      {
+         // this is strange...
       wxLogDebug(_T("mm_exists() for not opened folder '%s' ignored."),
                  GetName().c_str());
+      }
+#endif // DEBUG
 
       return;



-------------------------------------------------------
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

Reply via email to