Bug 121843 - Cannot create new folders with IMAP using Dovecot-imapd, regression from 3.4.X
Summary: Cannot create new folders with IMAP using Dovecot-imapd, regression from 3.4.X
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.9.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 120614 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-02-12 19:50 UTC by Jeremy Sonander
Modified: 2007-09-14 12:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Sonander 2006-02-12 19:50:26 UTC
Version:           1.9.1 (using KDE KDE 3.5.1)
Installed from:    Gentoo Packages
Compiler:          gcc 3.3.5 
OS:                Linux

Contrary to the release notes bug 115254 isn't fixed in kmail 1.9.1 as far as I can see. I couldn't find a way to reopen 115254 so I added this new one. 

I notice that the official fix does not contain all the changes suggested in http://bugs.kde.org/show_bug.cgi?id=115254#c6, specifically the change to line 1284 (now 1283) imapaccountbase.cpp to add the extra !newName.isEmpty() term. 

I changed my imapaccountbase.cpp at line 1284 so it now looks like this

    if (!newName.isEmpty() && !newName.endsWith( delim ) && !folderName.startsWith( delim ) ) { 
      newName = newName + delim;
    }

And the problem is fixed. If a kmail developer wants a dovecot account to test this fix, they can email me and I can create such a thing.
Comment 1 Carsten Burghardt 2006-02-13 19:45:57 UTC
A test account would be good indeed.
Comment 2 Juha Tuomala 2006-02-14 18:30:39 UTC
I cofirm this, it doesn't create folders with dovecot.
Comment 3 Robert Ryans 2006-04-08 19:33:26 UTC
I am also seeing this with kmail from the KDE-Redhat 3.5.1/3.5.2 packages on Scientific Linux 305, connecting to a dovecot server on a Scientific Linux 4.2 machine. I can supply a test account if that would be helpful.
Comment 4 Robert Ryans 2006-04-08 23:53:44 UTC
As a followup, I have been experimenting, and if I add the patch from comment 6 in bug 115254, rebuild, and replace libkmailprivate with the rebuilt version, things seem to work OK and I can now create folders in the root level once more.
Comment 5 Carsten Burghardt 2006-04-09 12:51:43 UTC
SVN commit 527774 by burghard:

Do not create wrong folder paths.
BUGS:121843


 M  +2 -1      imapaccountbase.cpp  


--- branches/KDE/3.5/kdepim/kmail/imapaccountbase.cpp #527773:527774
@@ -1281,7 +1281,8 @@
     if ( delim.isEmpty() ) {
       delim = "/";
     }
-    if ( !newName.endsWith( delim ) && !folderName.startsWith( delim ) ) {
+    if ( !newName.isEmpty() && 
+         !newName.endsWith( delim ) && !folderName.startsWith( delim ) ) {
       newName = newName + delim;
     }
     newName = newName + folderName;
Comment 6 Carsten Burghardt 2006-04-09 12:56:43 UTC
*** Bug 120614 has been marked as a duplicate of this bug. ***