зеркало из https://github.com/mozilla/gecko-dev.git
Bug 381280 Places bookmarks.html importer ignores 'browser.bookmarks.file' pref, r=mano
This commit is contained in:
Родитель
92bf93cdba
Коммит
d1a01b07f2
|
@ -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()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче