Opened 2 years ago
Closed 2 years ago
#1487661 closed Bugs (duplicate)
Cannot create folder with capital 'i'
| Reported by: | janisk | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.5-stable |
| Component: | IMAP connection | Version: | 0.5-beta |
| Severity: | normal | Keywords: | capital letter 'i' folder problem |
| Cc: |
Description
Creation of folder that starts with I always fails, also, it is not possible to open folders that starts with this letter if they are already created on another IMAP client.
Attachments (1)
Change History (8)
comment:1 Changed 2 years ago by alec
- Milestone changed from later to 0.5-stable
comment:2 Changed 2 years ago by janisk
problem is in file:
program/include/rcube_imap.php
and this function:
function mod_mailbox($mbox_name, $mode='in')
comment:3 Changed 2 years ago by alec
- Resolution set to duplicate
- Status changed from new to closed
Duplicate of #1487657
comment:4 Changed 2 years ago by alex@…
This is not resolved. The code in mod_mailbox is broken.
if ($root[0] && strpos($mbox_name, $root[0]) === 0) {
compares the first letter ("I") of "INBOX" with the first letter of the mailbox. This is true for every mailbox that starts with a capital "I". Please fix it.
--- roundcubemail-0.5-rc/program/include/rcube_imap.php 2010-12-17 16:07:04.000000000 +0100
+++ roundcubemail/program/include/rcube_imap.php 2011-01-07 18:26:47.000000000 +0100
@@ -3144,6 +3144,7 @@
{
$result = false;
$abs_name = $this->mod_mailbox($name);
+
$result = $this->conn->createFolder($abs_name);
// try to subscribe it
@@ -3319,7 +3320,7 @@
if (is_array($this->namespace['shared'])) {
foreach ($this->namespace['shared'] as $ns) {
foreach ((array)$ns as $root) {
- if ($root[0] && strpos($mbox_name, $root[0]) === 0) {
+ if ($root && strpos($mbox_name, $root) === 0) {
return $mbox_name;
}
}
@@ -3328,7 +3329,7 @@
if (is_array($this->namespace['other'])) {
foreach ($this->namespace['other'] as $ns) {
foreach ((array)$ns as $root) {
- if ($root[0] && strpos($mbox_name, $root[0]) === 0) {
+ if ($root && strpos($mbox_name, $root) === 0) {
return $mbox_name;
}
}
@@ -3337,13 +3338,13 @@
if (is_array($this->namespace['personal'])) {
foreach ($this->namespace['personal'] as $ns) {
foreach ((array)$ns as $root) {
- if ($root[0] && strpos($mbox_name, $root[0]) === 0) {
+ if ($root && strpos($mbox_name, $root) === 0) {
return $mbox_name;
}
}
}
// Add prefix if first personal namespace is non-empty
- if ($this->namespace['personal'][0][0]) {
+ if ($mbox_name != 'INBOX' && $this->namespace['personal'][0][0]) {
return $this->namespace['personal'][0][0].$mbox_name;
}
}
comment:5 Changed 2 years ago by alex@…
- Resolution duplicate deleted
- Status changed from closed to reopened
comment:6 Changed 2 years ago by alex@…
sorry, did not check the latest trunk. It's fixed there. Please close again.
comment:7 Changed 2 years ago by alec
- Resolution set to duplicate
- Status changed from reopened to closed

Provide imap_debug log. Use svn-trunk version. Works for me.