Closed Bug 1655686 Opened 4 years ago Closed 4 years ago

Migrate address books with bad filenames

Categories

(Thunderbird :: Address Book, task)

Tracking

(thunderbird_esr78 fixed, thunderbird80 fixed)

RESOLVED FIXED
81 Branch
Tracking Status
thunderbird_esr78 --- fixed
thunderbird80 --- fixed

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(3 files)

In bug 1653234 we discovered that address books with an extra dot in the filename failed to initialise. We should change the migration step to avoid this, and maybe try to fix books that have already been migrated.

The migration was failing for address books that have been through the previous migration and have
a file name like foo.na2.mab. This is because the AddrBookDirectory.init wasn't expecting a dot in
the file name, which I've changed.

In addition, migration wouldn't happen where the dirType pref is the default value (2 in earlier
versions, 101 now) but the file name is not the default (abook.mab or history.mab), so I've fixed
that here too.

It doesn't make sense to remove the .mab extension on migration, but not remove the earlier .na2
extension.

Also adds a check that other unusual but valid file names are migrated.

Depends on D85832

This prevents (mostly harmless, I think) error messages in the migration process.

Depends on D85833

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/52d578abd339
Fix migration of address books with a dot in the file name. r=mkmelin
https://hg.mozilla.org/comm-central/rev/703cb3c4144a
On migration, remove the old .na2 extension from address book file names. r=mkmelin
https://hg.mozilla.org/comm-central/rev/4212bbca8156
Migrate all address book preferences before any address book contacts. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

Comment on attachment 9167836 [details]
Bug 1655686 - Fix migration of address books with a dot in the file name. r?mkmelin

Requesting approval for all three patches. There's some risk here, not to beta because this is for the 68->78 migration, but I'd appreciate it being tested as much as possible (68->this).

Attachment #9167836 - Flags: approval-comm-beta?

Comment on attachment 9167836 [details]
Bug 1655686 - Fix migration of address books with a dot in the file name. r?mkmelin

[Triage Comment]
Approved for beta

Attachment #9167836 - Flags: approval-comm-beta? → approval-comm-beta+
Attachment #9167836 - Flags: approval-comm-esr78?

Comment on attachment 9167836 [details]
Bug 1655686 - Fix migration of address books with a dot in the file name. r?mkmelin

[Triage Comment]
Approved for esr78

Rob, please take this on a respin of 78.1.2 (and the other 3 patches).

Flags: needinfo?(rob)
Attachment #9167836 - Flags: approval-comm-esr78? → approval-comm-esr78+

Comment on attachment 9167837 [details]
Bug 1655686 - On migration, remove the old .na2 extension from address book file names. r?mkmelin

[Triage Comment]
Approved for esr78 (already landed on beta)

Attachment #9167837 - Flags: approval-comm-esr78+
Attachment #9167837 - Flags: approval-comm-beta+

Comment on attachment 9167838 [details]
Bug 1655686 - Migrate all address book preferences before any address book contacts. r?mkmelin

[Triage Comment]
Approved for esr78 (already landed on beta)

Attachment #9167838 - Flags: approval-comm-esr78+
Attachment #9167838 - Flags: approval-comm-beta+

(In reply to Wayne Mery (:wsmwk) from comment #8)

Rob, please take this on a respin of 78.1.2 (and the other 3 patches).

Three? The three on this bug and one more from?

Flags: needinfo?(vseerror)

I think I meant to say the other two - all from this bug

Flags: needinfo?(vseerror)
Flags: needinfo?(rob)
You need to log in before you can comment on or make changes to this bug.