Closed Bug 424654 Opened 16 years ago Closed 16 years ago

Restore from file doesn't give warning of loss of bookmarks

Categories

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

defect

Tracking

()

VERIFIED FIXED
Firefox 3

People

(Reporter: zurtex, Assigned: dietrich)

References

Details

(Whiteboard: [patch in bug 422919])

Attachments

(1 file)

1. Go to Places Library 
2. Click Import and Backup
3. Go to Restore
4. Click choose file
5. Click o.k
6. All your bookmarks are destroyed and replaced with new ones without any warning


Should be a warning that all your bookmarks will be replaced, like when you click restore from a date.
Flags: blocking-firefox3?
We should just use the same dialog we do for restoring from a date.
Flags: blocking-firefox3? → blocking-firefox3+
Priority: -- → P2
Assignee: nobody → dietrich
Target Milestone: --- → Firefox 3
Attached patch fix v1Splinter Review
Attachment #311461 - Flags: review?(mano)
Whiteboard: [has patch][needs review mano]
Comment on attachment 311461 [details] [diff] [review]
fix v1

>? browser/components/places/content/.places.js.swp
>Index: browser/components/places/content/places.js
>===================================================================

>   /**
>    * Restores bookmarks from an HTML or JSON file.
>    */
>   restoreBookmarksFromFile: function PO_restoreBookmarksFromFile(aFile) {
>     var prompts = Cc["@mozilla.org/embedcomp/prompt-service;1"].
>                   getService(Ci.nsIPromptService);
>     if (!prompts.confirm(null,
>                          PlacesUIUtils.getString("bookmarksRestoreAlertTitle"),
>                          PlacesUIUtils.getString("bookmarksRestoreAlert")))
>       return;
> 
>-    if (aFile.leafName.match("\.json$")) {
>-      // restore a JSON backup
>+    if (aFile.leafName.match("\.json$"))
>       PlacesUtils.restoreBookmarksFromJSONFile(aFile);
>-    }
>-    else {
>-      var importer = Cc["@mozilla.org/browser/places/import-export-service;1"].
>-                     getService(Ci.nsIPlacesImportExportService);
>-      importer.importHTMLFromFile(aFile, true /* overwrite existing */);
>-    }
>   },
> 

that's supposed to be part of bug 422919, right?

r=mano if so
Attachment #311461 - Flags: review?(mano) → review+
Whiteboard: [has patch][needs review mano] → [has patch][has review]
Whiteboard: [has patch][has review] → [patch in bug 422919]
Depends on: 422919
Flags: in-testsuite?
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Verified: warning of bookmark loss dialog is present
Status: RESOLVED → VERIFIED
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: