Closed Bug 78791 Opened 24 years ago Closed 23 years ago

Folder creation fails due to incorrect verification (i.e., verifying parent..not itself)

Categories

(MailNews Core :: Networking: IMAP, defect, P1)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: racham, Assigned: Bienvenu)

References

Details

(Whiteboard: [nsbeta1+] fix in hand, (wait bug 23625 fix to verify this bug))

Attachments

(4 files)

When we try to create a folder dynamically on IMAP server, we fail while the ensureFolderExists returns the wrong value. David (bienvenu) says that it is due to the fact that we are verifying the existence of the parent and returning true instead of checking the exitence of folder itself. That makes the app to think that the folder already existed and hence there is no need to create one. That will be a problem once we try to copy Sent message/Draft message or template into that folder.
Unless we do the right thing here, we have to hold on fix for bug 23625. Marking dependency. Adding some of david's comments on this discussion : OK, I see the problem. Basically, this code that tries to ensure that a folder exists, is checking if the *parent* folder is verified online, not itself, which is wrong.So it thinks the folder exists and doesn't try to create it. - David void nsImapProtocol::OnEnsureExistsFolder(const char * aSourceMailbox) { List(aSourceMailbox, PR_FALSE); // how to tell if that succeeded? PRBool exists = PR_FALSE; if (m_imapMailFolderSink) m_imapMailFolderSink->GetFolderVerifiedOnline(&exists); if (exists) { Subscribe(aSourceMailbox); } else {
Blocks: 23625
Keywords: nsbeta1
QA Contact: esther → huang
Priority: -- → P1
marking nsbeta1+ and moving to 0.9.1 to see if we can get this and 23625 in.
Whiteboard: [nsbeta1+]
Target Milestone: --- → mozilla0.9.1
Attached patch proposed fix (deleted) — Splinter Review
bhuvan, could you review the patch? After that, I'll get an sr from seth or mscott and check it in.
Status: NEW → ASSIGNED
Whiteboard: [nsbeta1+] → [nsbeta1+] fix in hand
in the idl folderVerifiedOnline instead of FolderVerifiedOnline the folder name is going to be the modified UTF7, right?
We do allow i18n names for folders..right..? So, does the input param need to wstring instead of string..? bhuvan
that's why I asked about aSourceMailbox being in modified UTF7
Add Seth to cc list.
Bhuvan, just saw your comment - no, imap uses modified utf-7 to store folder names, and we use utf8, both of which are normal strings, not wstrings.
I was just talking to Naoki about that and also referred ftp://ftp.isi.edu/in-notes/rfc2192.txt. r=bhuvan (on new patch).
fix checked in. Bhuvan, let me know if you have any problems. If this helps with 23652, you should probably mark this one verified.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
We need to verify all the 0.9.1 bugs, Bhuvan, can you help for verifying this bug? Please mark as verified if you verify the code for this bug. Thanks.
ok. sure. Let me check with my code and I will update the status here. bhuvan
I tested this with my patch. There are couple of points that I need to mention. 1. When I create a new IAMP account for the very first time (which has no sent,drafts or templates folders) and try to send a message which triggers the action of creating Sent folder, the folder creation failed. It came back with message that folder did not exist. Attaching the IMAP log (imapLog_FAILURE). So, just on the very first attepmt, it fails. 2. On the subsequent occasions, the folder creation happens without any problems. Will attach iamp log for this also (imapLog_SUCCESS) David, you can look at the logs and let me know If the problem is somewhere else for that one case. If needed, I can open a new bug. Until then, I am reopening the bug and moving the TFV to 0.9.2 as bug 23625 also targeted to the same milestone.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Attached patch imapLog_FAILURE (deleted) — Splinter Review
Attached patch imapLog_SUCCESS (deleted) — Splinter Review
I have no idea why it would fail the first time and work the second time - it should be running the same code both times.
I tried this with an account that didn't have a templates folder and the templates folder was created fine (the code that creates sent/templates/etc is the same). I'll investigate more, but I'm not sure what went wrong when you tried it. I have a feeling it might have to do with running against a brand new account, for some reason.
this bug is fixed. The problem is in the compose code. I'll go update the parent bug with comments.
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
David, this bug's fix is ONLY for trunk build, right?
no, it's been fixed for a while. But there is still a problem in the compose code which makes it so you can't verify this bug.
>this bug is fixed. The problem is in the compose code. I'll go update the >parent bug with comments. Can I know that parent bug number? Is that bug 23625?
yes, the bug that's dependent on this one is the parent bug.
OK. Thanks for the info. Adding curent status on Status Whiteboard for this bug.
Whiteboard: [nsbeta1+] fix in hand → [nsbeta1+] fix in hand, (wait bug 23625 fix to verify this bug)
We need to verify all the 0.9.2 bugs, and since dependence bug 23625 fixed. Bhuvan, can you help for verifying this bug? Please mark as verified if you verify the code for this bug. Thanks.
This is fixed as we can create new folders on demand. Verified.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: