when an orphan bookmark is found, reparent it to the unfiled bookmarks folder

This commit is contained in:
Dan Mills 2009-01-08 21:33:59 -08:00
Родитель 928336472f
Коммит f93e31391a
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -540,7 +540,13 @@ BookmarksStore.prototype = {
}, },
_getWeaveParentIdForItem: function BStore__getWeaveParentIdForItem(itemId) { _getWeaveParentIdForItem: function BStore__getWeaveParentIdForItem(itemId) {
return this._getWeaveIdForItem(this._bms.getFolderIdForItem(itemId)); let parentid = this._bms.getFolderIdForItem(itemId);
if (parentid == -1) {
this._log.debug("Found orphan bookmark, reparenting to unfiled");
parentid = this._bms.unfiledBookmarksFolder;
this._bms.moveItem(itemId, parentid, -1);
}
return this._getWeaveIdForItem(parentid);
}, },
_getChildren: function BStore_getChildren(guid, depthIndex, items) { _getChildren: function BStore_getChildren(guid, depthIndex, items) {