зеркало из https://github.com/mozilla/gecko-dev.git
when an orphan bookmark is found, reparent it to the unfiled bookmarks folder
This commit is contained in:
Родитель
928336472f
Коммит
f93e31391a
|
@ -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) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче