Open Bug 754217 Opened 13 years ago Updated 2 years ago

Photo is not deleted when contact is deleted

Categories

(Thunderbird :: Address Book, defect)

defect

Tracking

(Not tracked)

People

(Reporter: davkal, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19 Steps to reproduce: I created contact with attached photo file. Then I deleted this contact. Actual results: The photo file in [ProfileFolder]/Photos was not removed. Expected results: The photo file should have been removed, since the contact does not exist any more.
(In reply to davkal from comment #0) Confirmed: User Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 Application Build ID: 20120428123100 When you delete a contact, the photo stays in the folder.
mconley, is it worth to fix this or will the new Addressbook rewrite all this backend? Or can I find some small fix inside nsAddrDatabase::DeleteCard that could go for TB24 yet? Or is that not the right place?
Flags: needinfo?(mconley)
(In reply to :aceman from comment #2) > mconley, is it worth to fix this or will the new Addressbook rewrite all > this backend? > > Or can I find some small fix inside nsAddrDatabase::DeleteCard that could go > for TB24 yet? Or is that not the right place? Yes, it's worth fixing this. The new address book will not be ready for some time. The front-end is responsible for taking the photo file, copying it into the profile directory, and setting the PhotoURL attribute of the card to the file URL... I suppose DeleteCard could do the job to delete. It would need to ensure that the URL is a file URL, and then attempt to delete it (should probably just log an error if it cannot delete the file, but otherwise be non-fatal).
Flags: needinfo?(mconley)

(In reply to Mike Conley (:mconley) (:⚙️) from comment #3)

Yes, it's worth fixing this. The new address book will not be ready for some
time.

Indeed... (7 years after comment 3, and counting...)

Confirming based on comment 3 (after checking there's no bug which explicitly fixed this). Can't test because adding photo is broken.

OS: Windows 7 → All
Hardware: x86 → All
Summary: photo is not deleted when contact is deleted → Photo is not deleted when contact is deleted
Version: 12 Branch → Trunk
Status: UNCONFIRMED → NEW
Ever confirmed: true
Depends on: 1619155
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.