Skip to content

Commit

Permalink
Fix bug where subfolders could loose subscription on parent folder re…
Browse files Browse the repository at this point in the history
…name (#8892)
  • Loading branch information
alecpl committed May 10, 2023
1 parent 3648caa commit 9d9912c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -41,6 +41,7 @@
- Fix so vCard output does not contain non-standard/redundant TYPE=OTHER and TYPE=INTERNET (#8838)
- Fix QR code images for contacts with non-ASCII characters (#9001)
- Fix PHP8 warnings when using list_flags and list_cols properties by plugins (#8998)
- Fix bug where subfolders could loose subscription on parent folder rename (#8892)

## Release 1.6.1

Expand Down
2 changes: 1 addition & 1 deletion program/actions/settings/folder_edit.php
Expand Up @@ -84,7 +84,7 @@ public static function folder_form($attrib)
if (strlen($path)) {
$path_id = $path;
$path = $storage->mod_folder($path . $delimiter);
if ($path[strlen($path)-1] == $delimiter) {
if (($path[strlen($path)-1] ?? '') == $delimiter) {
$path = substr($path, 0, -1);
}
}
Expand Down
4 changes: 2 additions & 2 deletions program/lib/Roundcube/rcube_imap.php
Expand Up @@ -3374,7 +3374,7 @@ public function rename_folder($folder, $new_name)

// get list of subscribed folders
if ((strpos($folder, '%') === false) && (strpos($folder, '*') === false)) {
$a_subscribed = $this->list_folders_subscribed('', $folder . $delm . '*');
$a_subscribed = $this->list_folders_subscribed($folder . $delm, '*');
$subscribed = $this->folder_exists($folder, true);
}
else {
Expand Down Expand Up @@ -3429,7 +3429,7 @@ public function delete_folder($folder)
// get list of sub-folders or all folders
// if folder name contains special characters
$path = strpos($folder, '*') === false && strpos($folder, '%') === false ? ($folder . $delm) : '';
$sub_mboxes = $this->list_folders('', $path . '*');
$sub_mboxes = $this->list_folders($path, '*');

// According to RFC3501 deleting a \Noselect folder
// with subfolders may fail. To workaround this we delete
Expand Down

0 comments on commit 9d9912c

Please sign in to comment.