summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-18 21:38:19 (UTC)
committer zautrix <zautrix>2005-03-18 21:38:19 (UTC)
commitf0232b7801f098b5842e3cd5a1fd804af98ab862 (patch) (side-by-side diff)
tree7537ad5f4b86a4c7e0965051ce0082bcb8d023fa
parent246da4d3796f5e03a3ce5f2b2febe9e1c8dd7a7e (diff)
downloadkdepimpi-f0232b7801f098b5842e3cd5a1fd804af98ab862.zip
kdepimpi-f0232b7801f098b5842e3cd5a1fd804af98ab862.tar.gz
kdepimpi-f0232b7801f098b5842e3cd5a1fd804af98ab862.tar.bz2
etpan fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/mhwrapper.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/kmicromail/libmailwrapper/mhwrapper.cpp b/kmicromail/libmailwrapper/mhwrapper.cpp
index 982d7a6..787e85d 100644
--- a/kmicromail/libmailwrapper/mhwrapper.cpp
+++ b/kmicromail/libmailwrapper/mhwrapper.cpp
@@ -178,6 +178,3 @@ int MHwrapper::createMbox(const QString&folder,const FolderP&pfolder,const QStri
{
- init_storage();
- if (!m_storage) {
- return 0;
- }
+
QString f;
@@ -191,6 +188,15 @@ int MHwrapper::createMbox(const QString&folder,const FolderP&pfolder,const QStri
}
-
+ QFileInfo fi ( f );
+ if ( fi. exists () ) {
+ qDebug("folder exists ");
+ return 1;
+ }
+ qDebug("creating folder ---%s--- ",f.latin1() );
+ init_storage();
+ if (!m_storage) {
+ return 0;
+ }
int r = mailsession_create_folder(m_storage->sto_session,(char*)f.latin1());
if (r != MAIL_NO_ERROR) {
- qDebug("error creating folder ");
+ qDebug("error %d creating folder %s", r, f.latin1());
return 0;
@@ -209,3 +215,3 @@ void MHwrapper::storeMessage(const char*msg,size_t length, const QString&Folder)
if (r!=MAIL_NO_ERROR) {
- qDebug("error selecting folder! ");
+ qDebug("error selecting folder %d", r);
return;
@@ -214,3 +220,4 @@ void MHwrapper::storeMessage(const char*msg,size_t length, const QString&Folder)
if (r!=MAIL_NO_ERROR) {
- qDebug("error storing mail ");
+ if ( r != MAIL_ERROR_APPEND )
+ qDebug("error storing mail %d", r);
}