Closed Bug 588006 Opened 14 years ago Closed 14 years ago

Renaming folders doesn't work, folder appears empty until restart

Categories

(MailNews Core :: Backend, defect)

defect
Not set
major

Tracking

(blocking-thunderbird5.0 needed, blocking-seamonkey2.1 needed, seamonkey2.1 wanted)

RESOLVED FIXED
Thunderbird 3.3a3
Tracking Status
blocking-thunderbird5.0 --- needed
blocking-seamonkey2.1 --- needed
seamonkey2.1 --- wanted

People

(Reporter: kairo, Assigned: neil)

References

Details

(Keywords: regression)

Attachments

(2 files)

Trying to rename a feed folder doesn't work correctly on SeaMonkey trunk, probably Thunderbird trunk as well. The folder itself does rename, but the subscription and messages in it don't show up any more, and after a restart of the application, the folder is back to the old name. This comes up on Error console (twice) when doing that rename: Fehler: An error occurred updating the button_delete command: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIMsgDBView.hdrForFirstSelectedMessage]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://messenger/content/mailWindowOverlay.js :: SelectedMessagesAreDeleted :: line 892" data: no] Quelldatei: chrome://global/content/globalOverlay.js Zeile: 86
With the patch I just attached to bug 566704, the error message is gone (if the folder contains messages) but the actual problem persists, so the error message is just a symptom that doesn't really help fixing this bug.
This affects Local Folders, too, not just feeds. Changing component to something more appropriate. Leaving in MailNews Core due to bug 606499 comment 1: confirmed with "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101022 Thunderbird/3.3a1pre" Last OK: 2010-07-25 Broken since: 2010-07-26 Regression range: http://hg.mozilla.org/comm-central/pushloghtml?startdate=2010-07-24+00%3A00%3A00&enddate=2010-07-25+23%3A59%3A59 -> Bug 377319 - Convert mailnews to frozen/external linkages Pro Tip: Setting regressionwindow-wanted if the window is unknown helps getting things fixed (or at least draw some attention). Seems like I cannot even *request* blocking-thunderbirdAnyDamnVersion. :-( Raising Importance since to the user this looks like dataloss (although the folder is back for me after an application restart).
Severity: normal → major
blocking-seamonkey2.1: --- → ?
Component: Feed Reader → Backend
QA Contact: feed.reader → backend
Summary: Renaming feed folders doesn't work → Renaming folders doesn't work, folder appears empty until restart
blocking-seamonkey2.1: ? → needed
Attached patch Proposed patchSplinter Review
The old code converted the hashed safe folder name from Unicode to platform encoding so it could pass the string off to nsILocalFile::MoveToNative. Since libxul doesn't provide an obvious conversion we simply switched to passing the original unicode strings to nsILocalFile::MoveTo which does the platform encoding for us. Unfortunately we failed to notice that we use the safeName again so it's not safe(!) to append .msf to it without using another temporary. I also removed the obsolete comment along the way.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #504289 - Flags: review?(bienvenu)
We're going to need some sort of unit test for this; I'll see if it can be an xpcshell test or if it needs to be a mozmill test.
Attached patch unit testSplinter Review
add an xpcshell test for this
Attachment #505442 - Flags: review?(bugzilla)
Attachment #504289 - Flags: review?(bienvenu) → review+
blocking-thunderbird5.0: --- → needed
Attachment #505442 - Flags: review?(bugzilla) → review+
Comment on attachment 504289 [details] [diff] [review] Proposed patch Pushed changeset 0c500ccf3988 to comm-central.
Comment on attachment 505442 [details] [diff] [review] unit test Pushed changeset de1b3c4b08a6 to comm-central.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
Target Milestone: --- → Thunderbird 3.3a3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: