<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Creation of IMAP subfolder fails</title> 
  <pubDate>Fri, 10 Apr 2026 17:02:27 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/6827</link> 
  <atom:link rel="self" type="application/rss+xml" title="Creation of IMAP subfolder fails" href="https://bugs.horde.org/ticket/6827/rss" /> 
  <description>Creation of IMAP subfolder fails</description> 
 
   
   
  <item> 
   <title>Hello together,



I&#039;m currently seeing a strange issue when</title> 
   <description>Hello together,



I&#039;m currently seeing a strange issue when I try to create an IMAP subfolder in IMP. When I check the &quot;INBOX&quot; and select &quot;Create folder&quot;, the popup appears. I enter &quot;subfolder&quot; as folder name. The creation of the new folder fails as it tries to create the folder &quot;/subfolder&quot;. 



When I do the same thing without checking &quot;INBOX&quot;, so it defaults to INBOX, my subfolder INBOX/subfolder gets created fine.



Anyone else seeing this?



Thomas

</description> 
   <pubDate>Tue, 03 Jun 2008 16:30:43 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6827#t45883</link> 
  </item> 
   
  <item> 
   <title>I found the source of the issue. IMP tried to create folders</title> 
   <description>I found the source of the issue. IMP tried to create folders

below &quot;INBOX&quot; like this: &quot;INBOX//new_folder&quot;.



The error occurs in imp/lib/IMAP/Tree.php::createMailboxName($parent, $new).

Here&#039;s a dump of the $ns_info structure:



Array

(

    [name] =&gt; INBOX/

    [delimiter] =&gt; /

    [type] =&gt; personal

    [hidden] =&gt;

)



$parent is set to &quot;INBOX&quot;, $new is &quot;new_folder&quot;.



Here&#039;s the code that computes the folder &quot;base&quot;:



    $mbox = $ns_info[&#039;name&#039;]; --&gt; mbox is &quot;INBOX/&quot;

    $mbox .= rtrim(substr_replace($parent, &#039;&#039;, 0, strlen($ns_info[&#039;name&#039;])), $ns_info[&#039;delimiter&#039;]) . $ns_info[&#039;delimiter&#039;];



substr_replace($parent, &#039;&#039;, 0, strlen($ns_info[&#039;name&#039;])) will lead to an empty string.

rtim() is a noop in this case.



Then we append the delimiter, so this results in &quot;INBOX//&quot;.



I&#039;ve developed a fix, though I don&#039;t know

if &quot;name -&gt; INBOX/&quot; is right in the first place.

</description> 
   <pubDate>Fri, 06 Jun 2008 12:20:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6827#t46048</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

  http://cvs</title> 
   <description>Changes have been made in CVS for this ticket:

  http://cvs.horde.org/diff.php/imp/docs/CHANGES?r1=1.1136&amp;r2=1.1137&amp;ty=u
  http://cvs.horde.org/diff.php/imp/lib/IMAP/Tree.php?r1=1.185&amp;r2=1.186&amp;ty=u</description> 
   <pubDate>Fri, 06 Jun 2008 17:58:39 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6827#t46066</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

  http://cvs</title> 
   <description>Changes have been made in CVS for this ticket:

  http://cvs.horde.org/diff.php/imp/docs/CHANGES?r1=1.699.2.308&amp;r2=1.699.2.309&amp;ty=u
  http://cvs.horde.org/diff.php/imp/lib/IMAP/Tree.php?r1=1.25.2.49&amp;r2=1.25.2.50&amp;ty=u</description> 
   <pubDate>Fri, 06 Jun 2008 18:00:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6827#t46067</link> 
  </item> 
   
  <item> 
   <title>Our code: right idea, wrong execution.  We just needed to do</title> 
   <description>Our code: right idea, wrong execution.  We just needed to do the rtrim on the whole string, not just the part we were adding.  So slightly modified your patch to do this and committed to IMP 4.2.1.</description> 
   <pubDate>Fri, 06 Jun 2008 18:01:11 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6827#t46068</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
