Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mboxwrapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp index 3a0b30a..bc496f7 100644 --- a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp | |||
@@ -239,25 +239,25 @@ void MBOXwrapper::deleteMails(mailmbox_folder*f,QList<RecMail> &target) | |||
239 | qDebug("error delete mail"); | 239 | qDebug("error delete mail"); |
240 | } | 240 | } |
241 | } | 241 | } |
242 | r = mailmbox_expunge(f); | 242 | r = mailmbox_expunge(f); |
243 | if (r != MAILMBOX_NO_ERROR) { | 243 | if (r != MAILMBOX_NO_ERROR) { |
244 | qDebug("error expunge mailbox"); | 244 | qDebug("error expunge mailbox"); |
245 | } | 245 | } |
246 | } | 246 | } |
247 | 247 | ||
248 | int MBOXwrapper::deleteAllMail(const Folder*tfolder) | 248 | int MBOXwrapper::deleteAllMail(const Folder*tfolder) |
249 | { | 249 | { |
250 | if (!tfolder) return 0; | 250 | if (!tfolder) return 0; |
251 | QString p = MBOXPath+tfolder->getDisplayName(); | 251 | QString p = MBOXPath+"/"+tfolder->getDisplayName(); |
252 | int res = 1; | 252 | int res = 1; |
253 | 253 | ||
254 | mailfolder*folder = 0; | 254 | mailfolder*folder = 0; |
255 | mailmessage_list*l=0; | 255 | mailmessage_list*l=0; |
256 | mailstorage*storage = mailstorage_new(NULL); | 256 | mailstorage*storage = mailstorage_new(NULL); |
257 | int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0); | 257 | int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0); |
258 | if (r != MAIL_NO_ERROR) { | 258 | if (r != MAIL_NO_ERROR) { |
259 | Global::statusMessage(tr("Error initializing mbox")); | 259 | Global::statusMessage(tr("Error initializing mbox")); |
260 | res = 0; | 260 | res = 0; |
261 | } | 261 | } |
262 | if (res) { | 262 | if (res) { |
263 | folder = mailfolder_new( storage,(char*)p.latin1(),NULL); | 263 | folder = mailfolder_new( storage,(char*)p.latin1(),NULL); |
@@ -282,25 +282,25 @@ int MBOXwrapper::deleteAllMail(const Folder*tfolder) | |||
282 | break; | 282 | break; |
283 | } | 283 | } |
284 | } | 284 | } |
285 | if (l) mailmessage_list_free(l); | 285 | if (l) mailmessage_list_free(l); |
286 | if (folder) mailfolder_free(folder); | 286 | if (folder) mailfolder_free(folder); |
287 | if (storage) mailstorage_free(storage); | 287 | if (storage) mailstorage_free(storage); |
288 | return res; | 288 | return res; |
289 | } | 289 | } |
290 | 290 | ||
291 | int MBOXwrapper::deleteMbox(const Folder*tfolder) | 291 | int MBOXwrapper::deleteMbox(const Folder*tfolder) |
292 | { | 292 | { |
293 | if (!tfolder) return 0; | 293 | if (!tfolder) return 0; |
294 | QString p = MBOXPath+tfolder->getDisplayName(); | 294 | QString p = MBOXPath+"/"+tfolder->getDisplayName(); |
295 | QFile fi(p); | 295 | QFile fi(p); |
296 | if (!fi.exists()) { | 296 | if (!fi.exists()) { |
297 | Global::statusMessage(tr("Mailbox doesn't exist.")); | 297 | Global::statusMessage(tr("Mailbox doesn't exist.")); |
298 | return 0; | 298 | return 0; |
299 | } | 299 | } |
300 | if (!fi.remove()) { | 300 | if (!fi.remove()) { |
301 | Global::statusMessage(tr("Error deleting Mailbox.")); | 301 | Global::statusMessage(tr("Error deleting Mailbox.")); |
302 | return 0; | 302 | return 0; |
303 | } | 303 | } |
304 | return 1; | 304 | return 1; |
305 | } | 305 | } |
306 | 306 | ||