From d1a01b07f22b4ff6a218e7f20878b3f0fe7c89f0 Mon Sep 17 00:00:00 2001 From: "jminta@gmail.com" Date: Sat, 19 May 2007 17:56:50 -0700 Subject: [PATCH] Bug 381280 Places bookmarks.html importer ignores 'browser.bookmarks.file' pref, r=mano --- browser/components/nsBrowserGlue.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index acd070fbd8a8..57a1fe394943 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -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()) {