Reset mail.collect_addressbook pref when the address book it points to is deleted
Categories
(MailNews Core :: Address Book, defect)
Tracking
(Not tracked)
People
(Reporter: darktrojan, Assigned: darktrojan)
References
Details
Attachments
(1 file)
|
8.64 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
From bug 1625650 comment 2:
Side note: for this crash to happen the user would have to have an invalid value for mail.collect_addressbook, probably an address book that's been deleted. Should we reset that pref if the directory it points to is deleted?
| Assignee | ||
Comment 1•5 years ago
|
||
This patch suffered from scope creep. I fixed the original problem, then I realised that the two built-in directories could be deleted which should never happen. When writing a test for these I remembered that it's possible to throw more user-friendly exceptions than just Cr.NS_ERROR_FAILURE, so I changed some of those.
Comment 2•5 years ago
|
||
| Assignee | ||
Comment 3•5 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #2)
It think it's nice to also add the uri to the message like
The address book does not exist; uri=${uri}
I don't think that's helpful here, uri would always be either "moz-abdirectory://" or the same with a search query on the end. That is, if we ever hit this code, and I hope we don't.
I would move this whole if clause up.
It's already at the top of the function it's in, logically at least. There's only a function definition above it.
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/f30adb6e9f15
Several improvements in address book manager. r=mkmelin
| Assignee | ||
Updated•5 years ago
|
Description
•