From 83d4efdbe8bc4b98edfa2dbecf88ac41734bb656 Mon Sep 17 00:00:00 2001 From: stekkel Date: Fri, 17 May 2002 08:27:41 +0000 Subject: [PATCH] fix for mailboxes with trailing delimiter in the new mailboxtree git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2835 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_mailbox.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 7dfab0fe..21a0ffa7 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -755,6 +755,9 @@ function sqimap_mailbox_tree($imap_stream) { if (preg_match("/^\*\s+LIST\s+\((.*)\)\s+\"(.*)\"\s+\"?(.+(?=\")|.+).*$/",$inbox_ary[0],$regs)) { $flag = $regs[1]; $mbx = trim($regs[3]); + if (substr($mbx, -1) == $delimiter) { + $mbx = substr($mbx, 0, strlen($mbx) - 1); + } $sorted_lsub_ary[] = array ('mbx' => $mbx, 'flag' => $flag); } } -- 2.25.1