Bug 381280 Places bookmarks.html importer ignores 'browser.bookmarks.file' pref, r=mano

This commit is contained in:
jminta@gmail.com 2007-05-19 17:56:50 -07:00
Родитель 92bf93cdba
Коммит d1a01b07f2
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -182,7 +182,7 @@ BrowserGlue.prototype = {
/**
* Initialize Places
* - imports bookmarks.html if bookmarks datastore is empty
* - imports the bookmarks html file if bookmarks datastore is empty
*/
_initPlaces: function bg__initPlaces() {
#ifdef MOZ_PLACES_BOOKMARKS
@ -205,13 +205,11 @@ BrowserGlue.prototype = {
var dirService = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties);
var profDir = dirService.get("ProfD", Components.interfaces.nsILocalFile);
var bookmarksFile = profDir.clone(); // bookmarks.html
bookmarksFile.append("bookmarks.html");
var bookmarksFile = dirService.get("BMarks", Components.interfaces.nsILocalFile);
if (bookmarksFile.exists()) {
// import bookmarks.html
// import the file
try {
var importer =
Components.classes["@mozilla.org/browser/places/import-export-service;1"]
@ -224,6 +222,7 @@ BrowserGlue.prototype = {
// backup pre-places bookmarks.html
// XXXtodo remove this before betas, after import/export is solid
var profDir = dirService.get("ProfD", Components.interfaces.nsILocalFile);
var bookmarksBackup = profDir.clone();
bookmarksBackup.append("bookmarks.preplaces.html");
if (!bookmarksBackup.exists()) {