Browse Source

When copying a folder to trash before deletion, check that the top folder name really contains the delimiter.

alex-brainstorm 21 years ago
parent
commit
8d114e5072
1 changed files with 3 additions and 1 deletions
  1. 3 1
      functions/tree.php

+ 3 - 1
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']) {