From 4bce71a5de179d5ef15d1965b96d3969aa362e43 Mon Sep 17 00:00:00 2001 From: alex-brainstorm Date: Fri, 26 Mar 2004 12:02:30 +0000 Subject: [PATCH] When copying a folder to trash before deletion, check that the top folder name really contains the delimiter. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6903 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/tree.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/tree.php b/functions/tree.php index 2ae801f3..0b3274fd 100644 --- a/functions/tree.php +++ b/functions/tree.php @@ -135,7 +135,9 @@ function walkTreeInPreOrderDeleteFolders($index, $imap_stream, $tree) { function walkTreeInPostOrderCreatingFoldersUnderTrash($index, $imap_stream, $tree, $topFolderName) { global $trash_folder, $delimiter; - $position = strrpos($topFolderName, $delimiter) + 1; + $position = strrpos($topFolderName, $delimiter); + if ($position !== FALSE) + $position++; $subFolderName = substr($tree[$index]['value'], $position); if ($tree[$index]['doIHaveChildren']) { -- 2.25.1