Closed Bug 470269 Opened 17 years ago Closed 17 years ago

creating root imap folder ignores personal namespace

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b2

People

(Reporter: Bienvenu, Assigned: Bienvenu)

References

Details

Attachments

(1 file)

Attached patch proposed fixSplinter Review
If you have an imap account where "INBOX." is the personal namespace, meaning all folders are sub-folders of the INBOX, and you try to create a root level folder, we fail silently. We should be respecting the personal namespace and use that as the parent folder. Neil, if you don't have an account like this, can you switch the review request to Standard8?
Attachment #353699 - Flags: superreview?(neil)
Attachment #353699 - Flags: review?(neil)
this is needed for creating the archives folder correctly.
Blocks: 451995
Status: NEW → ASSIGNED
Flags: blocking-thunderbird3+
Target Milestone: --- → Thunderbird 3.0b2
Comment on attachment 353699 [details] [diff] [review] proposed fix >+ if (onlineDir.IsEmpty() && ns) >+ onlineDir = ns->GetPrefix(); I don't have an account with a prefix or a non-standard delimiter but it seems to me that onlineDir uses /s while GetPrefix uses the server's delimiter?
onlineDir uses the server delimiter as well (or at least, that's how I've always specified it, e.g., "INBOX."). I have an account that uses "." as the delimiter, and makes all folders be sub-folders of the inbox, and this works fine...
Attachment #353699 - Flags: review?(neil) → review?(bugzilla)
I was just scared by this line later on that you can't see in the diff: onlineDirWithDelimiter.ReplaceChar('/', delimiter);
Attachment #353699 - Flags: superreview?(neil) → superreview+
Hardware: x86 → All
(In reply to comment #4) > I was just scared by this line later on that you can't see in the diff: > > onlineDirWithDelimiter.ReplaceChar('/', delimiter); Right, I think that just makes it so you can use the canonical delimiter, and we'll fix it for you, but users really shouldn't have to know about our canonical delimiter.
Attachment #353699 - Flags: review?(bugzilla) → review+
Comment on attachment 353699 [details] [diff] [review] proposed fix >+ nsIMAPNamespace *ns = nsnull; >+ rv = hostSessionList->GetNamespaceForMailboxForHost(m_serverKey.get(), >+ onlineMailboxName, ns); >+ if (!ns) >+ hostSessionList->GetDefaultNamespaceOfTypeForHost(m_serverKey.get(), kPersonalNamespace, ns); nit: I know its copy and paste, but seeing as we're here. Can you align the onlineMailboxName with the m_serverKey, and also wrap the GetDefaultNamespaceOfTypeForHost in the same way please?
fix checked in, with nits addressed
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
OS: Windows XP → All
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: