--- functions/tree.php.orig Thu Jun 3 20:26:25 2004 +++ functions/tree.php Thu Jun 3 20:26:25 2004 @@ -105,7 +105,13 @@ function walkTreeInPostOrderCreatingFoldersUnderTrash($index, $imap_stream, $tree, $topFolderName) { global $trash_folder, $delimiter; - $position = strrpos($topFolderName, $delimiter) + 1; +// $position = strrpos($topFolderName, $delimiter) + 1; + $position = strrpos($topFolderName, $delimiter); + if (($position) or ($position == '0')) { + $position++; + } else { + $position = 0; + } $subFolderName = substr($tree[$index]['value'], $position); if ($tree[$index]['doIHaveChildren']) {