Closed
Bug 160586
Opened 22 years ago
Closed 22 years ago
IMAP folder moved to ~/<folder> instead of ~/mail/<folder> when moving from sub-folder
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.3final
People
(Reporter: ewilson, Assigned: philip.zhao)
References
(Blocks 1 open bug)
Details
(Whiteboard: [landed on in 1.3 final branch, 3/11/03])
Attachments
(1 file, 5 obsolete files)
(deleted),
patch
|
sspitzer
:
review+
sspitzer
:
superreview+
asa
:
approval1.3+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1b) Gecko/20020721
BuildID: 2002072104
Using both Mozilla 1.0 and 1.1b I tried dragging an IMAP mailbox from a
subdirectory to the root mail directory. Actual mailbox file is moved from
~/mail/<subdir>/<mailbox> to ~/<mailbox>. Should have moved to
~/mail/<mailbox>. .mailboxlist lists file as simply <mailbox> instread of
~/mail/<mailbox> as well.
Reproducible: Always
Steps to Reproduce:
1. set IMAP server directory to "~/mail/"
2. drag a subscribed mailbox into root directory
3. get Alert "The current command did not succeed. The mail server responded:
SELECT failed: Can't open mailbox ~/mail/<folder>: no such mailbox.
Actual Results: File is moved into ~/<mailbox> instead of ~/mail/<mailbox>.
.mailboxlist has entry for <mailbox> not for ~/mail/<mailbox>. Used shell
access to move back and correct entries in .mailboxlist
Expected Results: should have moved file to ~/mail/<mailbox> and listed
~/mail/<mailbox> in .mailboxlist
not sure if this affects any other imap servers than UW imap. Also the
behaviour is fine when moving between sub-directories, only occurs when moving
to root folder
Comment 1•22 years ago
|
||
I can reproduce this bug using 1.3a on Mac OS X 10.2.2 using Sun's IMAP server.
Assignee | ||
Comment 3•22 years ago
|
||
I will look into this one soon.
Assignee | ||
Comment 4•22 years ago
|
||
In nsImapUrl::CreateServerDestinationFolderPathString, mozilla should always
use AllocateServerPath() but should not set requested
DestinationFolderPathString to "" directly when we move a folder to root.
And in nsImapUrl::AddOnlineDirIfNeccessary, we should also give a check if the
onlineMailboxName is "".
Assignee | ||
Comment 5•22 years ago
|
||
Pls review. Thanks. :)
Attachment #110142 -
Attachment is obsolete: true
Comment 6•22 years ago
|
||
instead of + if ( !PL_strcmp(onlineMailboxName,"") )
can't you just use *onlineMailboxName?
it's less code, and faster.
Assignee | ||
Comment 7•22 years ago
|
||
Thanks David,I change it.Please r=? if it's all right.Thanks.
Attachment #113989 -
Attachment is obsolete: true
Comment 8•22 years ago
|
||
Comment on attachment 114063 [details] [diff] [review]
patch for review
r=bienvenu
Attachment #114063 -
Flags: review+
Assignee | ||
Comment 10•22 years ago
|
||
My falt. Sorry,David&Henry.
This is the correct patch. It runs.
Pls r=?&sr=?
Attachment #114063 -
Attachment is obsolete: true
Comment 11•22 years ago
|
||
Comment on attachment 114072 [details] [diff] [review]
correct patch for review
Carry David's r= here. It's just a very small change between the two patches.
sr=Henry
Require for approval 1.3. This is a small patch.
Attachment #114072 -
Flags: superreview+
Attachment #114072 -
Flags: review+
Attachment #114072 -
Flags: approval1.3?
Comment 12•22 years ago
|
||
assuming I'm understanding the code (and your patch), instead of:
if ( onlineDirWithDelimiter.Last() != delimiter )
onlineDirWithDelimiter += delimiter;
if ( !*onlineMailboxName )
onlineDirWithDelimiter.SetLength(onlineDirWithDelimiter.Length()-1);
I think this would be better:
if ( onlineDirWithDelimiter.Last() != delimiter && *onlineMailboxName)
onlineDirWithDelimiter += delimiter;
Why add the delimiter and then remove it, right?
re-assign to philip.zhao@sun.com
Assignee: mscott → philip.zhao
Comment 13•22 years ago
|
||
philip, let me know if you need help testing on another server (other than UW IMAP).
we'd want to verify that this code does the right thing on non-UW IMAP servers.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.3final
Comment 14•22 years ago
|
||
Comment on attachment 114072 [details] [diff] [review]
correct patch for review
clearing approval request until I hear back from philip or henry about the
change I suggested and if they need help testing on non-uw imap servers.
Attachment #114072 -
Flags: approval1.3?
Assignee | ||
Comment 15•22 years ago
|
||
You're right,sspitzer. I changed it. Please see if it's well then. And I tested
this patch on iPlanet mail server , it works well. Please give me your Cyrus
server account and Courier server account, I will test them soon then. Thx. :)
Assignee | ||
Updated•22 years ago
|
Attachment #114072 -
Attachment is obsolete: true
Comment 16•22 years ago
|
||
But onlineDirWithDelimiter may already have the delimiter before the code goes
to if ( onlineDirWithDelimiter.Last() != delimiter ), i.e. it's 'INBOX.'. We
still need to remove the delimiter if onlineMailboxName is "". Right?
Assignee | ||
Comment 17•22 years ago
|
||
Yes,henry. I test again. If the IMAP directory is set "INBOX." like, the drag of
a subfolder to root will still error with attachment 114292 [details] [diff] [review]. Then we will turn
to attachment 114072 [details] [diff] [review]. And look for sspitzer's approval? Thanks sspitzer.
Assignee | ||
Comment 18•22 years ago
|
||
Comment on attachment 114072 [details] [diff] [review]
correct patch for review
=> not obsolete.
Attachment #114072 -
Attachment is obsolete: false
Assignee | ||
Comment 19•22 years ago
|
||
Comment on attachment 114292 [details] [diff] [review]
patch with sspitzer's suggestion
=> obsolete
Attachment #114292 -
Attachment is obsolete: true
Attachment #114072 -
Flags: approval1.3?
Comment 20•22 years ago
|
||
I've got access to UW, Cyrus and Netscape Messaging Server 4.15
I'll try out your patch tomorrow, and let you know.
Comment 21•22 years ago
|
||
Comment on attachment 114072 [details] [diff] [review]
correct patch for review
sr=sspitzer
stepping through the code, if (!m_destinationCanonicalFolderPathSubString),
AllocateServerPath() will still do the right thing.
I tested on UW, Cyrus, and Netscape Messaging.
my only nit would be to fix
nsImapUrl::CreateServerDestinationFolderPathString()
and remove
nsresult rv = NS_OK;
and do:
nsresult rv =
AllocateServerPath(...);
Assignee | ||
Comment 22•22 years ago
|
||
Thanks sspitzer!
While, still wait for an approval. :)
Comment 23•22 years ago
|
||
Attachment #114072 -
Attachment is obsolete: true
Updated•22 years ago
|
Attachment #114072 -
Flags: approval1.3?
Comment 24•22 years ago
|
||
Comment on attachment 115322 [details] [diff] [review]
patch, with minor nit cleanup
r/sr=henry.jia,sspitzer
Attachment #115322 -
Flags: superreview+
Attachment #115322 -
Flags: review+
Attachment #115322 -
Flags: approval1.3?
Comment 25•22 years ago
|
||
fixed on the trunk. not fixed on the 1.3 branch yet.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 26•22 years ago
|
||
Comment on attachment 115322 [details] [diff] [review]
patch, with minor nit cleanup
a=asa (on behalf of drivers) for checkins to 1.3
Attachment #115322 -
Flags: approval1.3? → approval1.3+
Comment 27•22 years ago
|
||
before I land on 1.3, I'll wait for this to be verified.
moving to 1.4 alpha, so there is no confusion as to when it was fixed.
if I land in 1.3 final, I'll change the TM back to 1.3 final.
Target Milestone: mozilla1.3final → mozilla1.4alpha
Comment 28•22 years ago
|
||
has approval for 1.3 final, but I'll wait until the bug is verified.
Whiteboard: [1.3 final candidate]
Comment 29•22 years ago
|
||
I back ported this fix to the 1.3 branch.
Whiteboard: [1.3 final candidate] → [landed on in 1.3 final branch, 3/11/03]
Target Milestone: mozilla1.4alpha → mozilla1.3final
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•