rename mail folder from X to Y to X is broken

RESOLVED FIXED

Status

--
critical
RESOLVED FIXED
14 years ago
10 years ago

People

(Reporter: zieren.expires-06-2005, Assigned: Bienvenu)

Tracking

Trunk
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2

Create a new mail folger named X. Move a mail into it. Rename it to Y. All is
well. Change your mind and rename it back to X again. The mail is gone. Rename
it back to Y and it's there again.

Reproducible: Always

Steps to Reproduce:
1. Create a new mail folger named X. 2. Move a mail into it. 3. Rename it to Y.
All is well. 4. Change your mind and rename it back to X again. The mail is
gone. (5. Rename it back to Y and it's there again.)

Actual Results:  
The mail is lost.

Expected Results:  
The mail should remain in the folder. Actually, the rename operation does not
seem to get through to all files on disk (just my $0,02).

Comment 1

14 years ago
I've found something which can cause the bug in
mailnews/base/util/nsMsgDBFolder.cpp line 3034. The function Delete() seems not
to do its job, because it just returns NS_OK and do nothing. Just above it is a
comment "now delete the disk storage for _this_". I think that the function
should delete the folder's files on disk, but I'm not sure.

Comment 2

13 years ago
So i did some debugging:
1. Created new folder named bug
2. Moved one mail into it: bug 5,01KB, bug.msf 1,60KB
3. Rename bug-->bug2: bug2 5,01KB bug2.msf 1,70KB, this got added to bug2.msf:
@$${1{@
@$${1{@
<(94=bug2)>[1:^9F(^B3^94)]
@$$}1}@
4. Rename bug2-->bug: bug 5,01KB bug.msf 1,70KB, bug2.msf 0byte
bug.msf doesn't differ from (former) bug2.msf, there is also a empty file bug2
Assignee: mscott → bienvenu
Component: Mail Window Front End → MailNews: Database
Product: Thunderbird → Core
Version: unspecified → Trunk

Comment 3

13 years ago
BTW: I'm not sure, but I think the problem starts somewhere within
rdf->GetResource(uri, getter_AddRefs(res));. uri->mStorage itself would be
"mailbox://nobody@Local%20Folders/X" here, so that looks ok. But i'm not sure if
the code under nsRDFService.cpp#1034 (and following lines) does the correct
thing, entry is
-	entry	0x0371ede4
 +	PLDHashEntryHdr	{...}
 +	mKey	0x063d8cb0 "mailbox://nobody@Local%20Folders/X"
 +	mResource	0x063d8a98
here, but
(entry->mResource)))).mPath).mRawPtr)).mFileSpec).mPath).mData)).mString is
"[path skipped]\Y". This leads to creation of the empty file Y and probably also
then empty file Y.msf. And this confuses Mozilla then?
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 4

13 years ago
I just found Bug 65303, we should check again when that bug is fixed.
Depends on: 65303

Comment 5

13 years ago
ok seems fixed to me, i just did what is described in Comment 0 and everything
worked as expected.
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.