Closed Bug 298943 Opened 19 years ago Closed 19 years ago

if bookmarks.html is missing , bookmark.bak is not copied to bookmarks.html

Categories

(Firefox :: Bookmarks & History, defect, P2)

x86
All
defect

Tracking

()

RESOLVED FIXED
Firefox1.5

People

(Reporter: Peter6, Assigned: benjamin)

References

Details

(Keywords: dataloss, Whiteboard: [no l10n impact] has patch with reviews, needs approval)

Attachments

(1 file)

for backup of bookmarks , bookmark.bak was created.
however, the file is overwritten by the default bookmarks.html at startup

WARNING : backup your bookmarks before you try to reproduce !

repro:
1. close all FF instances
2. go to profile
3. delete bookmarks.html (NOT bookmarks.bak !)
4. open Firefox
5. open bookmarks and notice that all your bookmarks are replaced by the default
set.

exp:
in case that only bookmarks.html is missing, but bookmarks.bak is present
Firefox should copy bookmarks.bak to bookmarks.html to prevent dataloss
I forgot to mention the worst part.
if a new bookmarks.html is created from default , bookmarks.bak is immediately
overwritten and so all bookmarks are lost
This is evil, and if we fix this, I think we're past 99% of dataloss bugs at the
least.  Still looking, ccing some people who'll have an interest.
Flags: blocking1.8b3?
If this isn't working, then there's something wrong with
nsBookmarksService::MaybeRestoreFromBackup -- it should (is, but sounds like
it's buggy) explicitly be checking for both non-existant bookmarks.html and for
0-size bookmarks.html.
I probably caused this bug while fixing another, in
nsBrowserDirectoryProvider.cpp it uses EnsureProfileFile() unconditionally. I
did this so that if bookmarks.html is missing it is copied from the default
profile, which happens in the cases where you create a profile using the PM UI
or with the -profile commandline flag.
Flags: blocking1.8b4+
Flags: blocking1.8b3?
Flags: blocking1.8b3-
(In reply to comment #4)
> I probably caused this bug while fixing another, in
> nsBrowserDirectoryProvider.cpp it uses EnsureProfileFile() unconditionally. I
> did this so that if bookmarks.html is missing it is copied from the default
> profile, which happens in the cases where you create a profile using the PM UI
> or with the -profile commandline flag.

I can say that this bug has existed for at least 5-6 weeks...I think I may still
have the nightly from when i remember this...If i find it, ill update you all...
benjamin, would you be able to fix this?  if not, who should we get to do it?

/cb

Assignee: nobody → benjamin
Whiteboard: [no l10n impact] ETA 1-Aug
Priority: -- → P2
Target Milestone: --- → Firefox1.1
Attachment #190865 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #190865 - Flags: review?(mconnor)
Whiteboard: [no l10n impact] ETA 1-Aug → [no l10n impact] has patch, needs review mconnor + superreviewer
Comment on attachment 190865 [details] [diff] [review]
Move bookmarks.html restoration backup/profile logic, rev. 1

Although I don't understand why it's the job of the profile service to install
the default bookmarks.
Attachment #190865 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Attachment #190865 - Flags: review?(mconnor) → review+
Attachment #190865 - Flags: approval1.8b4?
Whiteboard: [no l10n impact] has patch, needs review mconnor + superreviewer → [no l10n impact] has patch with reviews, needs approval
Comment on attachment 190865 [details] [diff] [review]
Move bookmarks.html restoration backup/profile logic, rev. 1

a=chase@mozilla.org
Attachment #190865 - Flags: approval1.8b4? → approval1.8b4+
Fixed on trunk for 1.8b4
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Blocks: 306304
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: