Closed Bug 1925825 Opened 1 year ago Closed 1 year ago

nsMsgDBService::OpenMailDBFromFile() Creates wrong type of database for IMAP

Categories

(MailNews Core :: General, defect)

Thunderbird 128
defect

Tracking

(thunderbird_esr128 wontfix)

RESOLVED FIXED
137 Branch
Tracking Status
thunderbird_esr128 --- wontfix

People

(Reporter: benc, Assigned: benc)

References

Details

Attachments

(2 files)

nsMsgDBService::OpenMailDBFromFile() is the main (only?) function for creating a msgDB without an attachment to a folder.
However, it always creates a nsMailDatabase, which is no use for IMAP (nsImapMailDatabase) or NNTP (nsNewsDatabase).

There are a couple of places in IMAP which use it currently (I've come across it in Bug 1921694), so I'm sure there are some lovely subtle issues screwing things up somewhere :-)

But in particular, there's currently no way to create a stand-alone database for IMAP, which I really want for folder compaction over in Bug 1925117.

Depends on: 1926143
Version: unspecified → Thunderbird 128
No longer depends on: 1926143

The whole point of OpenMailDBFromFile() is that you can use it to access a db
in an arbitrary file, so it's a bit silly having to pass in a folder path.
It still only creates nsMailDatabase objects (used for local folders, not for
imap/news/etc), but that's coming in part 2.

This also renames .openMailDBFromFile() to .openDBFromFile(), as it's no longer
unconditionally creating an nsMailDatabase.

See Also: → 1947892

Pushed by heather@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/cc6efed0e653
Part 1 of 2 - Tweak nsMsgDBService::OpenMailDBFromFile() to use db filename rather than folder path. r=thunderbird-back-end-reviewers,darktrojan
https://hg.mozilla.org/comm-central/rev/d620463f133f
Part 2 of 2 - Make nsMsgDBService::OpenDBFromFile() open the correct type of database. r=thunderbird-back-end-reviewers,darktrojan

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: