Closed
Bug 437848
Opened 16 years ago
Closed 16 years ago
Moving a local folder with subfolders causes infinite recursion
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9
People
(Reporter: rain1, Assigned: rain1)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
5.68 KB,
patch
|
standard8
:
review+
rain1
:
superreview+
|
Details | Diff | Splinter Review |
When moving a local folder which has subfolders in it, an infinite recursion happens, causing the subfolder to be created inside itself, and again inside itself, and so on -- and this ultimately seems to stop and fail only when the FS limit for folder depth is reached. Steps to reproduce: 1. Create the following folder structure Local Folders - Inbox -- Folder1 --- Folder2 - Trash <other folders> 2. Drag and drop Folder1 from Inbox to Trash Observed: The copy fails. (in the filesystem) <Local mail directory> - Trash.sbd -- Folder1.sbd --- Folder2.sbd ---- Folder2.sbd ----- Folder2.sbd ... and so on This is a regression from bug 420614, according to blame. The patch should fix this, by moving back to the old behaviour of calling CopyFolderLocal from the new folder instead of the subfolder itself.
Flags: blocking-thunderbird3.0a2?
Attachment #324186 -
Flags: superreview?(bienvenu)
Attachment #324186 -
Flags: review?(bugzilla)
Assignee | ||
Comment 1•16 years ago
|
||
link: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/local/src/nsLocalMailFolder.cpp&rev=1.585&root=/cvsroot#1986
Comment 2•16 years ago
|
||
Would you be willing to try extending the unit test test_localSubFolders.js to cover this case? I think it should be pretty easy. I'll check the patch later, but at a first glance it seems right.
Flags: in-testsuite?
Comment 3•16 years ago
|
||
Comment on attachment 324186 [details] [diff] [review] patch >+ nsCOMPtr<nsIMsgLocalMailFolder> localFolder(do_QueryInterface(newMsgFolder, &rv)); As an optimisation this could be moved outside the loop e.g. to line 1964.
Comment 4•16 years ago
|
||
Comment on attachment 324186 [details] [diff] [review] patch thx, sid, that looks right.
Attachment #324186 -
Flags: superreview?(bienvenu) → superreview+
Comment 5•16 years ago
|
||
Comment on attachment 324186 [details] [diff] [review] patch As Neil suggested, please move that outside the loop with the appropriate change to the error check. r=me with that fixed.
Attachment #324186 -
Flags: review?(bugzilla) → review+
Comment 6•16 years ago
|
||
We should get this in for 3.0a2, given that it's a regression and have a patch basically ready for checkin.
Flags: blocking-thunderbird3.0a2? → blocking-thunderbird3.0a2+
Assignee | ||
Comment 7•16 years ago
|
||
Mark, could you please review the unit test and see if anything else should be added?
Attachment #324186 -
Attachment is obsolete: true
Attachment #324437 -
Flags: superreview+
Attachment #324437 -
Flags: review?(bugzilla)
Comment 8•16 years ago
|
||
Comment on attachment 324437 [details] [diff] [review] update, move folders out + update unit test That's fine, seems to catch the error nicely if I back out the cpp fix, thanks for doing the test. r=me.
Attachment #324437 -
Flags: review?(bugzilla) → review+
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Comment 9•16 years ago
|
||
Checking in mailnews/local/src/nsLocalMailFolder.cpp; /cvsroot/mozilla/mailnews/local/src/nsLocalMailFolder.cpp,v <-- nsLocalMailFolder.cpp new revision: 1.586; previous revision: 1.585 done Checking in mailnews/local/test/unit/test_localSubFolders.js; /cvsroot/mozilla/mailnews/local/test/unit/test_localSubFolders.js,v <-- test_localSubFolders.js new revision: 1.3; previous revision: 1.2
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite? → in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9
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
•