Deleting addressbook should also delete corresponding mab file

VERIFIED FIXED

Status

VERIFIED FIXED
18 years ago
13 years ago

People

(Reporter: bugzilla, Assigned: standard8)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
I just imported a LDIF file into my address book. This resulted in the creation 
of an addressbook called "ab" and of the file called "impab.mab".
Now I deleted the address book "ab" and quit mozilla.
The file "impab.mab" is still there!

The same if true if you create a new addressbook by File -> New -> Addressbook. 
The results in a file called "abook-1.mab"

Expected:
When deleting a extra created address book the file that used to hold the 
addressbook also gets deleted.
QA Contact: esther → pmock

Comment 1

18 years ago
QA-assign-to fenella.
QA Contact: pmock → fenella

Updated

17 years ago
QA Contact: fenella → nbaca
(Reporter)

Comment 2

17 years ago
is this fixed? I think so...

Comment 3

17 years ago
Trunk build 2002-01-16-03:WinMe
Marking Worksforme, will check linux and mac next.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → WORKSFORME

Comment 4

17 years ago
Reopening

Mac 9.1
It appears to delete new address book files (abook-1.mab) but
does not delete the imported address book files (impab.mab).

WinMe: ok, for new address books and imported address book.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

Comment 5

17 years ago
Not a high priority but assigning to Seth for now.
Assignee: chuang → sspitzer
Status: REOPENED → NEW

Comment 6

16 years ago
Also present on Linux (BuildID 2002123101 compiled on Red Hat 8.0, running on
Red Hat 8.0.92+). Have not checked for new adressbook files, but for imported
adressbooks, the file does stay around (size 1446 in one of the cases, so it
probably has most information deleted from it).
Product: Browser → Seamonkey
Created attachment 171183 [details] [diff] [review]
Don't always create a database file if one doesn't exist

This patch stops us creating a database when we GetDatabasefromURI which can be
quite frequent, and is also called just after we've deleted the database file
(from two places). I looked back in the history, and could find no particular
reason why we call it with create here - we normally create the file when we
create the database anyway.

I have also checked that this doesn't affect us if we have a corrupt PAB.

Whilst I think it works, it will be worth someone else testing and having a
look at the code to make sure I haven't missed anything.

Thanks.
Attachment #171183 - Flags: review?(bienvenu)

Comment 8

14 years ago
did you check that creating new ab's works? I assume you did, but you didn't
explicitly say so :-)
(In reply to comment #8)
> did you check that creating new ab's works? I assume you did, but you didn't
> explicitly say so :-)

Yep, creating or importing new ab's work fine.

Comment 10

14 years ago
Comment on attachment 171183 [details] [diff] [review]
Don't always create a database file if one doesn't exist

great, thx.
Attachment #171183 - Flags: review?(bienvenu) → review+
Attachment #171183 - Flags: superreview?(mscott)

Updated

14 years ago
Attachment #171183 - Flags: superreview?(mscott) → superreview+
Assignee: sspitzer → mark
patch checked in, marking as fixed.
2005-01-15 01:53	db48x%yahoo.com 	mozilla/ mailnews/ addrbook/ src/
nsAddressBook.cpp 	1.133 	3/1
Status: NEW → RESOLVED
Last Resolved: 17 years ago14 years ago
Resolution: --- → FIXED
Tested:

1. Created a personal address book called 'hammer' and noticed that in my user
profile 'abook-1.mab' appeared.
2. Imported an LDIF file called 'my-book.ldif' and saw that 'imapab.mab' existed.
3. Launched seamonkey.exe -addressbook and deleted them both.
4. Shutdown, visited my profile folder.
5. Verified that both 'abook-1mab' and 'imapab.mab' were both gone.

Verified FIXED using build 2005-07-24-06 on Windows XP SeaMonkey trunk.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.