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

RESOLVED FIXED in Thunderbird 3.3a3

Status

MailNews Core
Backend
--
major
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Robert Kaiser, Assigned: neil@parkwaycc.co.uk)

Tracking

({regression})

Trunk
Thunderbird 3.3a3
regression
Bug Flags:
in-testsuite +

Firefox Tracking Flags

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

Details

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
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
cf. bug 566704
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: --- → ?
status-seamonkey2.1: --- → ?
status-thunderbird5.0: --- → ?
Component: Feed Reader → Backend
QA Contact: feed.reader → backend
Duplicate of this bug: 606499
Summary: Renaming feed folders doesn't work → Renaming folders doesn't work, folder appears empty until restart

Updated

7 years ago
blocking-seamonkey2.1: ? → needed

Updated

7 years ago
status-seamonkey2.1: ? → wanted
(Assignee)

Comment 5

7 years ago
Created attachment 504289 [details] [diff] [review]
Proposed patch

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)

Comment 6

7 years ago
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.

Comment 7

7 years ago
Created attachment 505442 [details] [diff] [review]
unit test

add an xpcshell test for this
Attachment #505442 - Flags: review?(bugzilla)

Updated

7 years ago
Attachment #504289 - Flags: review?(bienvenu) → review+
blocking-thunderbird5.0: --- → needed
status-thunderbird5.0: ? → ---
Attachment #505442 - Flags: review?(bugzilla) → review+
(Assignee)

Comment 8

7 years ago
Comment on attachment 504289 [details] [diff] [review]
Proposed patch

Pushed changeset 0c500ccf3988 to comm-central.
(Assignee)

Comment 9

7 years ago
Comment on attachment 505442 [details] [diff] [review]
unit test

Pushed changeset de1b3c4b08a6 to comm-central.
(Assignee)

Updated

7 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 7 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.