Closed Bug 210683 Opened 21 years ago Closed 21 years ago

servername.sbd is created if ImapMail directory doesn't exist

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: Bienvenu)

Details

Attachments

(1 file, 1 obsolete file)

if you delete the ImapMail directory, like I normally do when Mozilla screws up
my IMAP mails, Mozilla creates a subdirectory called "[your imap
servername].sbd" instead of just "[your imap servername]"

basiclly it's a problem in CreateDirectoryForFolder and AddDirectorySeparator

the problem with the "[your imap servername].sbd" is that the next time mozilla
is launched your mail settings are remembered. because you end up with two
directories.

20030623
if you add:

nsFileSpec tempPath(pathResult.GetNativePathCString(), PR_TRUE);

just before the CreateDirectory() it works!
http://lxr.mozilla.org/mozilla/source/mailnews/imap/src/nsImapUtils.cpp#142

attaching diff/patch
Comment on attachment 126490 [details] [diff] [review]
patch to fix imapservername.sbd creation

David: could you review this?
Attachment #126490 - Flags: review?(bienvenu)
can you add a comment to the code as to why that works? Presumably, it creates
the parent directory w/o the .sbd as a side-effect...do we even need the
CreateDirectory call after it now?
Attached patch patch with noteSplinter Review
Attachment #126490 - Attachment is obsolete: true
Comment on attachment 126493 [details] [diff] [review]
patch with note

the:
pathResult.CreateDirectory();
is still needed.
Attachment #126493 - Flags: review?(bienvenu)
I'll need to figure out *why* this works before I can sr it. I'll try to get to
it as soon as I can.
I've got another bug where using the GetNativePathCString also helps. It's bug
209641
David: any update of this bug and the patch?
Does this happen if you just delete the server-specific sub-directory instead of
the ImapMail directory? It didn't happen to me...I can try deleting the ImapMail
directory...I' need to see what goes wrong before I can see the fix working.
I tried deleting ImapMail in another profile, and I didn't see this bug happen -
actually, looking more closely, it happened for one account but not another. So
I need to figure out why.
normally I delete the entire imapmail directory.
I think I testes this with check_all_folders pref woth on and off
David: you're really buzy working those IMAP bugs. Any update with this one?
Summary: servername.sbd is create if ImapMail directory doesn't exist → servername.sbd is created if ImapMail directory doesn't exist
I have been busy - I haven't had a chance to see why it happens for one account
and not the others.
David: to reproduce this bug:
1) create a clean profile with a imap account and log into the account.
2) quit thundeerbird or mozilla mail
3) delete the following files and directories:
panacea.dat
XUL.mfl
ImapMail
3) start mozilla mail or thunderbird you see the servername.sbd directory under
ImapMail:

via debug I see:
gemal: dbName: C:\DOCUMENTS AND SETTINGS\HENRIK GEMAL\APPLICATION DATA\Thunderbi
rd\Profiles\mail\rge83luq.slt\ImapMail\imap.gemal.dk.sbd\INBOX.msf
gemal: CreateNewFile: C:\DOCUMENTS AND SETTINGS\HENRIK GEMAL\APPLICATION DATA\Th
underbird\Profiles\mail\rge83luq.slt\ImapMail\imap.gemal.dk.sbd\INBOX.msf
Attachment #126490 - Flags: review?(bienvenu)
fix checked in, r/sr=me. Thx, Henrik, sorry it took me so long.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Attachment #126493 - Flags: review?(bienvenu) → review+
yes, it's checked in, and marked fixed.
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: