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

RESOLVED FIXED in Firefox1.5

Status

()

P2
critical
RESOLVED FIXED
14 years ago
7 years ago

People

(Reporter: Peter6, Assigned: benjamin)

Tracking

({dataloss})

Trunk
Firefox1.5
x86
All
dataloss
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.8b3 -
blocking1.8b5 +

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
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
(Reporter)

Comment 1

14 years ago
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.
(Assignee)

Comment 4

14 years ago
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.
(Assignee)

Updated

14 years ago
Flags: blocking1.8b4+
Flags: blocking1.8b3?
Flags: blocking1.8b3-

Comment 5

14 years ago
(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...

Comment 6

13 years ago
benjamin, would you be able to fix this?  if not, who should we get to do it?

/cb

Assignee: nobody → benjamin
(Assignee)

Updated

13 years ago
Whiteboard: [no l10n impact] ETA 1-Aug
(Assignee)

Updated

13 years ago
Priority: -- → P2
Target Milestone: --- → Firefox1.1
(Assignee)

Comment 7

13 years ago
Created attachment 190865 [details] [diff] [review]
Move bookmarks.html restoration backup/profile logic, rev. 1
Attachment #190865 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #190865 - Flags: review?(mconnor)
(Assignee)

Updated

13 years ago
Whiteboard: [no l10n impact] ETA 1-Aug → [no l10n impact] has patch, needs review mconnor + superreviewer

Comment 8

13 years ago
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+

Updated

13 years ago
Attachment #190865 - Flags: review?(mconnor) → review+
(Assignee)

Updated

13 years ago
Attachment #190865 - Flags: approval1.8b4?
(Assignee)

Updated

13 years ago
Whiteboard: [no l10n impact] has patch, needs review mconnor + superreviewer → [no l10n impact] has patch with reviews, needs approval

Comment 9

13 years ago
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+
(Assignee)

Comment 10

13 years ago
Fixed on trunk for 1.8b4
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED

Updated

13 years ago
Blocks: 306304
You need to log in before you can comment on or make changes to this bug.